-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathjest.config.js
46 lines (42 loc) · 1.51 KB
/
jest.config.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
"use strict"
module.exports = {
testMatch: [`**/unit/specs/**/*spec.js`],
moduleFileExtensions: [`js`, `vue`],
moduleDirectories: [`app/node_modules`, `node_modules`, `src`],
moduleNameMapper: {
"^src/(.*)$": `<rootDir>/app/src/$1`,
"^app/(.*)$": `<rootDir>/app/$1`,
"^renderer/(.*)$": `<rootDir>/app/src/renderer/$1`,
"^common/(.*)$": `<rootDir>/app/src/renderer/components/common/$1`,
"^govern/(.*)$": `<rootDir>/app/src/renderer/components/govern/$1`,
"^monitor/(.*)$": `<rootDir>/app/src/renderer/components/monitor/$1`,
"^staking/(.*)$": `<rootDir>/app/src/renderer/components/staking/$1`,
"^scripts/(.*)$": `<rootDir>/app/src/renderer/scripts/$1`,
"^wallet/(.*)$": `<rootDir>/app/src/renderer/components/wallet/$1`,
"^variables$": `<rootDir>/app/src/renderer/styles/variables.styl`
},
transform: {
".*\\.js$": `<rootDir>/node_modules/babel-jest`,
".*\\.vue$": `<rootDir>/node_modules/vue-jest`
},
transformIgnorePatterns: [`node_modules/(?!@tendermint/ui|.*vue)`],
collectCoverage: true,
mapCoverage: true,
coverageDirectory: `./test/unit/coverage`,
coverageReporters: [`lcov`],
coveragePathIgnorePatterns: [
`/node_modules/`,
`/build/`,
`/dist/`,
`/test/`,
`/app/src/config.js`
],
testURL: `http://localhost`,
setupFiles: [
`./test/unit/helpers/fixed_time.js`,
`./test/unit/helpers/console_error_throw.js`,
`./test/unit/helpers/genesis_mock.js`,
`./test/unit/helpers/electron_mock.js`,
`jest-localstorage-mock`
]
}