-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
39 lines (37 loc) · 975 Bytes
/
jest.config.ts
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
38
39
import type { JestConfigWithTsJest } from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!<rootDir>/node_modules/',
'!<rootDir>/demoDist/**',
'!<rootDir>/dist/**',
'!**/__tests-utils__/**',
'!**/__fixtures__/**',
'!src/**/*.d.ts',
'!src/**/types.ts',
'!src/**/typings.ts',
],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
coverageReporters: ['html', 'text', 'text-summary', 'cobertura'],
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
clearMocks: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
testMatch: [
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
],
};
export default jestConfig;