-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (34 loc) · 1.17 KB
/
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
33
34
35
36
37
// @ts-check
const CI = Boolean(process.env.CI)
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
...(CI && {
reporters: [
'default',
[
'jest-junit',
{
suiteName: 'Jest Tests',
outputDirectory: 'reports/jest/',
outputName: 'jest.junit.xml',
},
],
],
collectCoverage: true,
}),
transform: {
'^.+\\.ts$': require.resolve('ts-jest'),
},
coverageReporters: CI ? ['json'] : ['text', 'json'],
coverageDirectory: 'raw-coverage/jest/',
collectCoverageFrom: ['packages/**/src/**/*.ts', '.yarn/__virtual__/**/packages/**/*.ts'],
coveragePathIgnorePatterns: ['/node_modules/', '/__mocks__/', '\\.test.ts$', '\\.mock.ts$'],
watchPathIgnorePatterns: ['<rootDir>/packages/.*/lib', '<rootDir>/packages/.*/.*\\.js'],
testPathIgnorePatterns: ['/node_modules/', '/.yarn/', '<rootDir>/.*\\.js', '<rootDir>/.*/lib/'],
haste: {
throwOnModuleCollision: true,
},
modulePathIgnorePatterns: ['<rootDir>/.*/lib'],
testTimeout: 30000,
}
module.exports = config