Closed
Description
Describe the bug
Related to #391. Using jest.useFakeTimers()
in combination with waitFor
, causes the tests using waitFor
to fail due to timeout error:
Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.
Relying upon jest.useFakeTimers("modern")
instead causes the above failure for all tests if the file merely imports waitFor
at all, regardless if the given test uses waitFor
or not.
Expected behavior
All tests in the reproduction test case should pass.
Steps to Reproduce
- Clone the reproduction test case.
yarn install
yarn test
Versions
npmPackages:
@testing-library/react-native: ^7.0.1 => 7.0.1
react: ^16.13.1 => 16.13.1
react-native: ^0.63.2 => 0.63.2
react-test-renderer: ^16.13.1 => 16.13.1
Metadata
Metadata
Assignees
Labels
No labels