forked from aviriel/FOE-Tools.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
45 lines (45 loc) · 1.28 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
module.exports = {
testRegex: "/test/unit/.*.test.js$",
moduleFileExtensions: [
"js",
"json",
// tell Jest to handle `*.vue` files
"vue"
],
transform: {
// process `*.vue` files with `vue-jest`
".*\\.(vue)$": "vue-jest",
// process js with `babel-jest`
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
},
// support the same @ -> src alias mapping in source code
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/$1",
"^~/(.*)$": "<rootDir>/$1"
},
setupFiles: ["<rootDir>/test/unit/setup"],
snapshotSerializers: ["<rootDir>/node_modules/jest-serializer-vue"],
collectCoverage: false,
collectCoverageFrom: [
"**/*.{js,vue}",
"!**/components/graph-canvas/**",
"!**/components/promotion-message-builder/**",
"!**/components/import-promotion-message/**",
"!**/scripts/numeral_custom_locals/**",
"!**/coverage/**",
"!**/dist/**",
"!**/layouts/*.vue",
"!**/layouts/_default/components/**",
"!**/node_modules/**",
"!**/middleware/**",
"!**/pages/**",
"!**/plugins/**",
"!**/test/**",
"!**/scripts/errors.js",
"!**/*.config.js",
"!**/components/**/script.js",
"!**/components/number-input/**",
"!**/layouts/**/script.js"
],
coverageReporters: ["html", "text", "text-summary"]
};