-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
26 lines (26 loc) · 871 Bytes
/
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
module.exports = {
preset: "ts-jest",
// preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
testEnvironment: "jsdom",
transform: {
"^.+\\.vue$": "vue3-jest",
'^.+\\.tsx?$': 'ts-jest',
"^.+\\.js$": "babel-jest"
},
// rootDir: "src",
// moduleNameMapper: {
// // '^@/(.*)$': '<rootDir>/src/$1',
// "@(.*)$": "<rootDir>/src/$1",
// "\\.(css|scss)$": "identity-obj-proxy"
// },
moduleNameMapper: {
// '^@/(.*)$': '<rootDir>/src/$1',
"@/(.*)$": "<rootDir>/src/$1",
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
// "\\.(css|scss)$": "identity-obj-proxy"
},
moduleFileExtensions: ["js", "ts", "json", "vue"],
collectCoverageFrom: ["**/*.{ts,vue}", "!**/node_modules/**"],
setupFilesAfterEnv: ['<rootDir>/tests/jest.setup.js'],
// testRegex: "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$"
};