forked from jhipster/jhipster-sample-app-vuejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.conf.js
31 lines (31 loc) · 953 Bytes
/
jest.conf.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
module.exports = {
testEnvironment: 'jsdom',
coverageDirectory: '<rootDir>/target/test-results/',
coveragePathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/src/test/javascript/',
'<rootDir>/src/main/webapp/app/router',
'.*.json',
],
moduleFileExtensions: ['js', 'json', 'ts', 'vue'],
transform: {
'.*\\.(vue)$': 'vue-jest',
'^.+\\.tsx?$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/main/webapp/app/$1',
},
reporters: ['default', ['jest-junit', { outputDirectory: './target/test-results/', outputName: 'TESTS-results-jest.xml' }]],
testResultsProcessor: 'jest-sonar-reporter',
testMatch: ['<rootDir>/src/test/javascript/spec/**/@(*.)@(spec.ts)'],
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
rootDir: '../../../',
coverageThreshold: {
global: {
statements: 80,
branches: 60,
functions: 70,
lines: 80,
},
},
};