diff --git a/__mocks__/@react-native-async-storage/async-storage.js b/__mocks__/@react-native-async-storage/async-storage.js new file mode 100644 index 000000000..69d0e5302 --- /dev/null +++ b/__mocks__/@react-native-async-storage/async-storage.js @@ -0,0 +1 @@ +export * from '@react-native-async-storage/async-storage/jest/async-storage-mock'; diff --git a/jest.setup.js b/jest.setup.js index 8558c3ef0..4b98e94e0 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -14,6 +14,9 @@ jest.mock('react-native-permissions', () => jest.mock('@react-native-community/netinfo', () => mockRNCNetInfo); jest.mock('react-native-localize', () => mockRNLocalize); jest.mock('@synonymdev/react-native-ldk', () => mockLDK); +jest.mock('@react-native-async-storage/async-storage', () => + require('@react-native-async-storage/async-storage/jest/async-storage-mock'), +); global.net = require('net'); // needed by Electrum client. For RN it is proviced in shim.js global.tls = require('tls'); // needed by Electrum client. For RN it is proviced in shim.js