From 1b41079069f7b49e62f0aa6fd934800150e42fc5 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Mon, 24 Apr 2023 10:34:35 -0600 Subject: [PATCH] Tests: add missing await for waitFor statements Signed-off-by: Taylor Smock --- frontend/src/components/projects/tests/moreFiltersForm.test.js | 2 +- frontend/src/views/tests/fallback.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/projects/tests/moreFiltersForm.test.js b/frontend/src/components/projects/tests/moreFiltersForm.test.js index 73bcf1cf48..5cc4c68ae8 100644 --- a/frontend/src/components/projects/tests/moreFiltersForm.test.js +++ b/frontend/src/components/projects/tests/moreFiltersForm.test.js @@ -46,7 +46,7 @@ describe('MoreFiltersForm', () => { expect(switchControl).toBeInTheDocument(); await user.click(switchControl); - waitFor(() => + await waitFor(() => expect( decodeQueryParams( { diff --git a/frontend/src/views/tests/fallback.test.js b/frontend/src/views/tests/fallback.test.js index ead5ff8da9..2ecc9de24c 100644 --- a/frontend/src/views/tests/fallback.test.js +++ b/frontend/src/views/tests/fallback.test.js @@ -66,6 +66,6 @@ describe('Fallback component', () => { name: messages.return.defaultMessage, }); await user.click(returnBtn); - waitFor(() => expect(mockedUsedNavigate).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(mockedUsedNavigate).toHaveBeenCalledTimes(1)); }); });