From c1fcb36e28ebfc849fcc14a18046bd74528287bd Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 8 Sep 2020 15:21:11 -0400 Subject: [PATCH] Clarify waitFor documentation in regards to timer mocks Update documentation to explicitly state that one should not await the return or resolution of a `waitFor` call when relying upon timer mocks. --- website/docs/API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/API.md b/website/docs/API.md index 0199a076d..0ffeff239 100644 --- a/website/docs/API.md +++ b/website/docs/API.md @@ -354,7 +354,7 @@ test('waiting for an Banana to be ready', async () => { In order to properly use `waitFor` you need at least React >=16.9.0 (featuring async `act`) or React Native >=0.60 (which comes with React >=16.9.0). ::: -If you're using Jest's [Timer Mocks](https://jestjs.io/docs/en/timer-mocks#docsNav), remember not to use `async/await` syntax as it will stall your tests. +If you're using Jest's [Timer Mocks](https://jestjs.io/docs/en/timer-mocks#docsNav), remember not to await the return of `waitFor` as it will stall your tests. ## `waitForElementToBeRemoved`