forked from react-native-elements/react-native-elements
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestFrameworkSetup.js
More file actions
31 lines (26 loc) · 1.21 KB
/
testFrameworkSetup.js
File metadata and controls
31 lines (26 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from 'react';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import jsdom from 'jsdom';
import canvas from 'canvas-prebuilt';
const { JSDOM } = jsdom;
const { document } = new JSDOM('').window;
global.document = document;
// Object.defineProperty(document, 'currentScript', {
// value: document.createElement('script'),
// });
configure({ adapter: new Adapter() });
jest.mock('react-native-vector-icons/dist/Zocial', () => 'Icon');
jest.mock('react-native-vector-icons/dist/Octicons', () => 'Icon');
jest.mock('react-native-vector-icons/dist/MaterialIcons', () => 'Icon');
jest.mock(
'react-native-vector-icons/dist/MaterialCommunityIcons',
() => 'Icon'
);
jest.mock('react-native-vector-icons/dist/Ionicons', () => 'Icon');
jest.mock('react-native-vector-icons/dist/Foundation', () => 'Icon');
jest.mock('react-native-vector-icons/dist/EvilIcons', () => 'Icon');
jest.mock('react-native-vector-icons/dist/Entypo', () => 'Icon');
jest.mock('react-native-vector-icons/dist/FontAwesome', () => 'Icon');
jest.mock('react-native-vector-icons/dist/SimpleLineIcons', () => 'Icon');
jest.mock('react-native-vector-icons/dist/Feather', () => 'Icon');