forked from leiyu-97/utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
48 lines (48 loc) · 1.02 KB
/
jest.config.ts
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
export default {
moduleFileExtensions: [
"js",
"json",
"jsx",
"ts",
"tsx",
"vue"
],
testEnvironment: "node",
testPathIgnorePatterns: [
"/node_modules/"
],
preset: "ts-jest",
globals: {
"ts-jest": {
babelConfig: {
presets: ['power-assert']
}
}
},
collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx,vue}", "!**/node_modules/**", "!**/.*.js", "!src/dom/*"],
coverageDirectory: './.nyc_output',
coverageReporters: ['json'],
transform: {"\\.[jt]sx?$": "babel-jest"},
projects: [
{
testMatch: ["**/test/common/**/*.test.*"],
},
{
testMatch: ["**/test/node/**/*.test.*"],
},
{
testMatch: ["**/test/react/**/*.test.*"],
setupFiles: ["./test/react/setup.js"],
testEnvironment: "node",
},
{
testMatch: ["**/test/vue/**/*.test.*"],
setupFiles: ["./test/vue/setup.js"],
testEnvironment: "node",
transform: {
"\\.(vue)$": "vue-jest",
"\\.[jt]sx?$": "babel-jest"
},
}
]
};