forked from Expensify/react-native-onyx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjestSetup.js
More file actions
15 lines (12 loc) · 711 Bytes
/
jestSetup.js
File metadata and controls
15 lines (12 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
jest.mock('./lib/storage');
jest.mock('./lib/storage/platforms/index.native', () => require('./lib/storage/__mocks__'));
jest.mock('./lib/storage/platforms/index', () => require('./lib/storage/__mocks__'));
jest.mock('./lib/storage/providers/IDBKeyValProvider', () => require('./lib/storage/__mocks__'));
jest.mock('react-native-device-info', () => ({getFreeDiskStorage: () => {}}));
jest.mock('react-native-nitro-sqlite', () => ({
open: () => ({execute: () => {}}),
enableSimpleNullHandling: () => undefined,
}));
jest.useRealTimers();
const unstable_batchedUpdates_jest = require('react-test-renderer').unstable_batchedUpdates;
require('./lib/batch.native').default = unstable_batchedUpdates_jest;