-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest-setup.js
More file actions
54 lines (51 loc) · 734 Bytes
/
test-setup.js
File metadata and controls
54 lines (51 loc) · 734 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const React = require('react');
const {
configure,
shallow,
render,
mount,
} = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');
configure({ adapter: new Adapter() });
global.shallow = shallow;
global.render = render;
global.mount = mount;
global.React = React;
/* eslint-disable */
global.MOCK = Object.freeze({
SIMPLE: {
items: [
1,
2,
3,
4,
5,
],
},
ADVANCED: {
by: 4,
replace: true,
onEnd: jest.fn(),
items: [
{
id: 1,
},
{
id: 2,
},
{
id: 3,
},
{
id: 4,
},
{
id: 5,
},
{
id: 6,
},
],
},
});
/* eslint-enable */