-
Notifications
You must be signed in to change notification settings - Fork 4
/
globalMocks.js
66 lines (57 loc) · 1.69 KB
/
globalMocks.js
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
55
56
57
58
59
60
61
62
63
64
65
66
global.console = {
error: jest.fn(),
warn: jest.fn(),
/* eslint-disable no-console */
log: jest.fn(console.log),
};
global.URL.createObjectURL = jest.fn();
const mockIconProxy = new Proxy(
{},
{
get(obj, prop) {
return {
id: prop,
viewBox: null,
};
},
},
);
// jest.mock('echarts/charts', () => ({}));
// jest.mock('echarts/components', () => ({}));
// jest.mock('echarts/core', () => ({ use: jest.fn() }));
// jest.mock('echarts/renderers', () => ({}));
// jest.mock('vue-echarts', () => ({}));
// jest.mock('v-calendar/lib/components/date-picker.umd', () => ({}));
jest.mock('@cloudblueconnect/material-svg', () => mockIconProxy);
jest.mock('@cloudblueconnect/material-svg/animated', () => mockIconProxy);
jest.mock('@cloudblueconnect/material-svg/baseline', () => mockIconProxy);
jest.mock('@cloudblueconnect/material-svg/outline', () => mockIconProxy);
jest.mock('@cloudblueconnect/material-svg/round', () => mockIconProxy);
jest.mock('@cloudblueconnect/material-svg/sharp', () => mockIconProxy);
jest.mock('@cloudblueconnect/material-svg/twotone', () => mockIconProxy);
// jest.mock('@cloudblueconnect/country-flag-mapper', () => ({
// localeFlags: new Proxy({}, {
// get(obj, prop) {
// if (prop === 'xx') return null;
// return {
// id: prop,
// viewBox: null,
// };
// },
// }),
// flags: mockIconProxy,
// }));
global.VERSION = 4277742;
global.CONFIG = {
dev: {
proxy: {
vendorHost: 'vendor.cnct.info',
providerHost: 'provider.cnct.info',
},
localHosts: {
vendorHost: 'vendor.connect.local',
providerHost: 'provider.connect.local',
},
},
};
global.PRODUCTION = true;