Skip to content

Commit

Permalink
Adding legacy hint for useFakeTimers
Browse files Browse the repository at this point in the history
See this issue jestjs/jest#10221 for progress on support for the default 'modern' timer with react-native
  • Loading branch information
Andarius authored Jan 24, 2022
1 parent 58e587f commit 9337fac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/guide/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you have custom babel configuration for testing, make sure that Reanimated's
#### Timers
You can use jest timers to control animation
```js
jest.useFakeTimers();
jest.useFakeTimers(); // jest.useFakeTimers('legacy') for jest >= 27
// call animation
jest.runAllTimers();
```
Expand Down Expand Up @@ -91,4 +91,4 @@ More example tests you can see in our repository
## Recommended testing library

- [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/)
- [@testing-library/react-hooks](https://react-hooks-testing-library.com/) - for dealing with hooks
- [@testing-library/react-hooks](https://react-hooks-testing-library.com/) - for dealing with hooks

0 comments on commit 9337fac

Please sign in to comment.