Skip to content

Commit

Permalink
Add delay to fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Nov 2, 2021
1 parent 30f7773 commit a519fc7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Config } from '../../config';
import FilePickerApp, { $imports } from '../FilePickerApp';
import { checkAccessibility } from '../../../test-util/accessibility';
import mockImportedComponents from '../../../test-util/mock-imported-components';
import { waitFor } from '../../../test-util/wait';
import { delay, waitFor } from '../../../test-util/wait';

function interact(wrapper, callback) {
act(callback);
Expand Down Expand Up @@ -145,6 +145,7 @@ describe('FilePickerApp', () => {
selectContent(wrapper, 'https://example.com');

await waitFor(() => fakeAPICall.called);
await delay(100);
wrapper.update();

assert.calledWith(fakeAPICall, {
Expand Down

0 comments on commit a519fc7

Please sign in to comment.