-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsetupTests.js
More file actions
23 lines (21 loc) · 878 Bytes
/
setupTests.js
File metadata and controls
23 lines (21 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React from 'react';
import { Provider } from 'react-redux';
import { render } from '@testing-library/react-native';
import '@testing-library/jest-native/extend-expect';
import '@testing-library/react-native/cleanup-after-each';
import mockAsyncStorage from '@react-native-community/async-storage/jest/async-storage-mock';
jest.mock('@react-native-community/async-storage', () => mockAsyncStorage);
jest.mock('rn-fetch-blob', () => {
return {
DocumentDir: () => {},
polyfill: () => {},
};
});
jest.mock('@haskkor/react-native-pincode', () => {
return {
hasUserSetPinCode: false,
};
});
jest.mock('react-native-qrcode-scanner', () => {});
jest.mock('react-native-svg', () => jest.requireActual('./__MOCKS__/react-native-svg'));
global.renderConnected = (component, store) => render(<Provider store={store}>{component}</Provider>);