forked from synonymdev/bitkit-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.js
More file actions
13 lines (11 loc) · 743 Bytes
/
Copy pathjest.setup.js
File metadata and controls
13 lines (11 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
import mockRNDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock';
import mockRNCNetInfo from '@react-native-community/netinfo/jest/netinfo-mock';
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter');
jest.mock('react-native-device-info', () => mockRNDeviceInfo);
jest.mock('react-native-permissions', () =>
require('react-native-permissions/mock'),
);
jest.mock('@react-native-community/netinfo', () => mockRNCNetInfo);
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
global.fetch = require('node-fetch'); // TODO: replace with native api, when will be available