From 9bf149fd70dc8a40c41ab72dae3e818db499ea8a Mon Sep 17 00:00:00 2001 From: raychanks <34273644+raychanks@users.noreply.github.com> Date: Sat, 3 Apr 2021 16:41:19 +0800 Subject: [PATCH 1/3] docs: update jest.mock for 'NativeAnimatedHelper' in React Navigation example (#711) --- website/docs/ReactNavigation.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/docs/ReactNavigation.md b/website/docs/ReactNavigation.md index d9a80bcd8..a554d084e 100644 --- a/website/docs/ReactNavigation.md +++ b/website/docs/ReactNavigation.md @@ -165,6 +165,9 @@ import AppNavigator from '../AppNavigator'; // Silence the warning https://github.com/facebook/react-native/issues/11094#issuecomment-263240420 jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper'); +// Use the following mock instead if you're running React Native@0.64.0 or higher +// jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); + describe('Testing react navigation', () => { test('page contains the header and 10 items', async () => { const component = ( From f5ad244fa49db3f31a3f57ab53b1f4f1632b7c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 3 Apr 2021 11:58:29 +0200 Subject: [PATCH 2/3] Update website/docs/ReactNavigation.md --- website/docs/ReactNavigation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/ReactNavigation.md b/website/docs/ReactNavigation.md index a554d084e..f2bbd7d16 100644 --- a/website/docs/ReactNavigation.md +++ b/website/docs/ReactNavigation.md @@ -163,6 +163,7 @@ import { render, fireEvent } from '@testing-library/react-native'; import AppNavigator from '../AppNavigator'; // Silence the warning https://github.com/facebook/react-native/issues/11094#issuecomment-263240420 +// Use with React Native <= 0.63 jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper'); // Use the following mock instead if you're running React Native@0.64.0 or higher From a3be0641aeabbca4837fe4c7bce06f2f1f584300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 3 Apr 2021 11:59:05 +0200 Subject: [PATCH 3/3] Update website/docs/ReactNavigation.md --- website/docs/ReactNavigation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/ReactNavigation.md b/website/docs/ReactNavigation.md index f2bbd7d16..5f0f0ef34 100644 --- a/website/docs/ReactNavigation.md +++ b/website/docs/ReactNavigation.md @@ -166,7 +166,7 @@ import AppNavigator from '../AppNavigator'; // Use with React Native <= 0.63 jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper'); -// Use the following mock instead if you're running React Native@0.64.0 or higher +// Use this instead with React Native >= 0.64 // jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); describe('Testing react navigation', () => {