-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.cjs
28 lines (25 loc) · 873 Bytes
/
jest.config.cjs
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
// module.exports = {
// preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'
// }
module.exports = {
transform: {
"^.+\\.vue$": "@vue/vue3-jest",
"^.+\\.js$": "babel-jest",
"^.+\\.ts$": "ts-jest",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(js|ts)$",
moduleFileExtensions: ["vue", "js", "ts"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
},
coveragePathIgnorePatterns: ["/node_modules/", "/tests/"],
coverageReporters: ["text", "json-summary"],
// Fix in order for vue-test-utils to work with Jest 29
// https://test-utils.vuejs.org/migration/#test-runners-upgrade-notes
testEnvironmentOptions: {
customExportConditions: ["node", "node-addons"],
},
}
// module.exports = {
// preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'
// }