-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
32 lines (26 loc) · 913 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
27
28
29
30
31
32
const jestJunitConfig = {
outputDirectory: '<rootDir>/coverage',
outputName: 'unit-results.xml'
};
// eslint-disable-next-line
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/src/tsconfig.spec.json'
}
},
name: 'cypress-contract-stubs',
roots: ['<rootDir>/src/'],
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
testMatch: ['**/*+(spec|test).+(ts|js)?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
collectCoverage: true,
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/node_modules/**'],
coverageReporters: ['lcovonly', 'html', 'text-summary'],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/', 'index.ts', 'types.d.ts'],
coverageDirectory: '<rootDir>/coverage',
reporters: ['default', ['jest-junit', jestJunitConfig]],
cacheDirectory: '<rootDir>/node_modules/.cache/jest'
};