From e8fb327929cd50f3a2833b8c475df892b9fca93d Mon Sep 17 00:00:00 2001 From: Ramez Date: Mon, 7 Feb 2022 00:08:43 +0200 Subject: [PATCH] test: mock async storage --- __test__/setup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__test__/setup.js b/__test__/setup.js index 9503549f..43def3e5 100644 --- a/__test__/setup.js +++ b/__test__/setup.js @@ -1,4 +1,6 @@ -jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper'); +import mockAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock'; + +jest.mock('@react-native-async-storage/async-storage', () => mockAsyncStorage); jest.mock('@react-navigation/native', () => { const actualNav = jest.requireActual('@react-navigation/native'); return {