1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Chore: Mobile: Fix "missing act()" warning (#12476)

This commit is contained in:
Henry Heino
2025-06-11 13:48:00 -07:00
committed by GitHub
parent 0d176e434a
commit 3b7a677302

View File

@@ -143,6 +143,12 @@ const openEditor = async () => {
await expectToBeEditing(true);
};
const runEditorCommand = async (commandName: string) => {
await act(() => {
return CommandService.instance().execute(commandName);
});
};
describe('screens/Note', () => {
beforeEach(async () => {
await setupDatabaseAndSynchronizer(1);
@@ -340,9 +346,9 @@ describe('screens/Note', () => {
render(<WrappedNoteScreen />);
await expectToBeEditing(false);
await CommandService.instance().execute('toggleVisiblePanes');
await runEditorCommand('toggleVisiblePanes');
await expectToBeEditing(true);
await CommandService.instance().execute('toggleVisiblePanes');
await runEditorCommand('toggleVisiblePanes');
await expectToBeEditing(false);
});
});