Skip to content

Commit

Permalink
Adding legacy hint for useFakeTimers (software-mansion#2876)
Browse files Browse the repository at this point in the history
Updating documentation for jest >= 27 since the 'modern' useFakeTimers does not work (yet) with react-native: jestjs/jest#10221

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [X] Updated documentation
- [ ] Ensured that CI passes
  • Loading branch information
Andarius authored and yiheyang committed Feb 3, 2022
1 parent c54fc0a commit ff8f09f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/guide/testing.md
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

0 comments on commit ff8f09f

Please sign in to comment.