generated from CharlesStover/node-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.mjs
33 lines (32 loc) · 863 Bytes
/
jest.config.mjs
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
export default {
cacheDirectory: './jest/cache',
collectCoverage: true,
coverageDirectory: './jest/coverage',
coverageReporters: ['json', 'lcov', ['text', { skipFull: true }], 'clover'],
resetMocks: true,
resetModules: true,
restoreMocks: true,
roots: ['<rootDir>/src'],
testEnvironment: 'jsdom',
collectCoverageFrom: [
'<rootDir>/src/**/*.{ts,tsx}',
'!<rootDir>/src/**/*.d.ts',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
transform: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'^.+\\.tsx?$': 'babel-jest',
// eslint-disable-next-line @typescript-eslint/naming-convention
'@segment': 'babel-jest',
},
transformIgnorePatterns: [
'/node_modules/(?!@segment/analytics-next/dist/pkg/)',
],
};