Skip to content

Commit ff8f09f

Browse files
Andariusyiheyang
authored andcommitted
Adding legacy hint for useFakeTimers (software-mansion#2876)
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
1 parent c54fc0a commit ff8f09f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/guide/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ If you have custom babel configuration for testing, make sure that Reanimated's
4242
#### Timers
4343
You can use jest timers to control animation
4444
```js
45-
jest.useFakeTimers();
45+
jest.useFakeTimers(); // jest.useFakeTimers('legacy') for jest >= 27
4646
// call animation
4747
jest.runAllTimers();
4848
```

0 commit comments

Comments
 (0)