-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.cjs
42 lines (42 loc) · 1.05 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module.exports = {
preset: "@vue/cli-plugin-unit-jest",
verbose: true,
bail: false,
testEnvironment: 'jsdom',
moduleFileExtensions: [
'ts',
'vue',
'js',
],
transform: {
'^.+\\.vue$': '@vue/vue3-jest',
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': require.resolve('babel-jest'),
},
transformIgnorePatterns: [
'<rootdir>/node_modules/',
'<rootdir>/src/main.ts',
'<rootdir>/src/router/index.ts',
'<rootdir>/src/composable/*.ts',
],
testMatch: [
'<rootDir>/tests/unit/**/*.test.js',
'!<rootDir>/tests/unit/Vue/*.test.js',
],
collectCoverage: true,
collectCoverageFrom: [
'src/components/**/*.vue',
'!src/components/util/*.vue',
'!src/components/AssignContent/*.vue',
'!src/components/AssignRightBar/AssignButton.vue'
],
coverageReporters: ['html', 'lcov', 'text-summary'],
coveragePathIgnorePatterns: ['/node_modules/'],
coverageDirectory: "<rootDir>/tests/unit/coverage",
testURL: 'http://localhost/',
globals: {
"ts-jest": {
"tsconfig": "tsconfig.json"
}
}
};