-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.cjs
31 lines (31 loc) · 907 Bytes
/
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
module.exports = {
roots: ['<rootDir>/lib', '<rootDir>/bin'],
testMatch: ['**/?(*.)+(spec|test).+(ts|tsx|js)'],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
useESM: true,
},
],
},
coveragePathIgnorePatterns: ['<rootDir>/tests', '<rootDir>/node_modules'],
collectCoverageFrom: ['lib/**/*.ts', 'bin/**/*.ts', '!lib/utils/test-helper-functions.ts'],
errorOnDeprecated: true,
collectCoverage: true,
coverageThreshold: {
global: {
branches: 35,
functions: 40,
lines: 40,
statements: 40,
},
},
setupFilesAfterEnv: ['./lib/jest.setup.js'],
coverageReporters: ['json-summary', 'json', 'text'],
preset: 'jest-puppeteer',
};