From ff8f09f9e2040413b39345897aa2142f1530d5ae Mon Sep 17 00:00:00 2001 From: Julien Brayere Date: Wed, 2 Feb 2022 09:38:26 +0100 Subject: [PATCH] Adding legacy hint for useFakeTimers (#2876) Updating documentation for jest >= 27 since the 'modern' useFakeTimers does not work (yet) with react-native: https://github.com/facebook/jest/issues/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 --- docs/docs/guide/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/guide/testing.md b/docs/docs/guide/testing.md index d3d9bee5ec8..659897956df 100644 --- a/docs/docs/guide/testing.md +++ b/docs/docs/guide/testing.md @@ -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(); ```