forked from forbole/big-dipper-2.0-cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.setup.js
75 lines (69 loc) · 1.78 KB
/
jest.setup.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
67
68
69
70
71
72
73
74
75
/* eslint-disable */
require('@testing-library/jest-dom/extend-expect');
require('jest-localstorage-mock');
jest.mock('@utils/dayjs', () => {
const mockTest = () => ({
format: jest.fn(() => '2020-08-10 12:00:00'),
});
mockTest.utc = jest.fn(() => {
const format = jest.fn(() => '2020-08-10 12:00:00');
return (
{
format,
fromNow: jest.fn(() => '1 day ago'),
diff: jest.fn(() => 30),
local: jest.fn(() => ({
format,
}))
}
);
});
return ({
__esModule: true,
default: mockTest,
formatDayJs: jest.fn(() => '2020-08-10 12:00:00')
});
});
jest.mock('next/dynamic', () => () => {
const DynamicComponent = () => null;
DynamicComponent.displayName = 'LoadableComponent';
DynamicComponent.preload = jest.fn();
return DynamicComponent;
});
jest.mock('@configs', () => ({
chainConfig: {
"title": "Desmos Block Explorer",
"network": "morpheus-apollo-1",
"icon": "https://raw.githubusercontent.com/forbole/big-dipper-assets/master/desmos/icon.svg?sanitize=true",
"logo": "https://raw.githubusercontent.com/forbole/big-dipper-assets/master/desmos/logo.svg?sanitize=true",
"prefix": {
"consensus": "desmosvalcons",
"validator": "desmosvaloper",
"account": "desmos"
},
"genesis": {
"time": "2021-04-27T13:00:00",
"height": 1
},
"primaryTokenUnit": "udaric",
"tokenUnits": {
"udaric": {
"display": "daric",
"exponent": 6
}
},
"extra": {
"desmosProfile": true,
"forboleX": false
}
},
generalConfig: {
"maintainer": {
"name": "Forbole",
"url": "https://forbole.com"
},
"github": {
"reportIssue": "https://github.com/forbole/big-dipper-2.0-cosmos/issues"
}
}
}));