-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (26 loc) · 733 Bytes
/
jest.config.js
File metadata and controls
28 lines (26 loc) · 733 Bytes
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
import 'dotenv/config'
const isCI = process.env.CI === 'true'
export default {
verbose: true,
collectCoverage: false,
resetModules: true,
restoreMocks: true,
testEnvironment: 'node',
transform: {},
preset: 'ts-jest/presets/default-esm',
extensionsToTreatAsEsm: ['.ts'],
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
globals: {
'ts-jest': {
tsconfig: './tsconfig.test.json',
useESM: true,
},
},
collectCoverageFrom: ['<rootDir>/src/*.ts'],
coveragePathIgnorePatterns: ['<rootDir>/dist/', '/node_modules/', '<rootDir>/scripts', '<rootDir>/tools'],
coverageProvider: 'v8',
coverageReporters: isCI ? ['json'] : ['text'],
}