Skip to content

Commit 9ff40cb

Browse files
committed
fix: await waitFor calls in "handles async promises" test
1 parent f350136 commit 9ff40cb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/inline_edit/inline_edit_form.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ describe('EuiInlineEditForm', () => {
400400
});
401401
await act(async () => {
402402
fireEvent.click(getByTestSubject('euiInlineEditModeSaveButton'));
403-
waitFor(() => setTimeout(() => {}, 100)); // Let the promise finish resolving
403+
await waitFor(() => setTimeout(() => {}, 100)); // Let the promise finish resolving
404404
});
405405
expect(queryByTestSubject('euiInlineReadModeButton')).toBeFalsy();
406406
expect(getByTestSubject('euiInlineEditModeInput')).toBeTruthy();
@@ -412,7 +412,7 @@ describe('EuiInlineEditForm', () => {
412412
await act(async () => {
413413
fireEvent.click(getByTestSubject('euiInlineEditModeSaveButton'));
414414
});
415-
waitFor(() => {
415+
await waitFor(() => {
416416
expect(getByTestSubject('euiInlineReadModeButton')).toBeTruthy();
417417
expect(getByText('hey there')).toBeTruthy();
418418
});

0 commit comments

Comments
 (0)