-
Notifications
You must be signed in to change notification settings - Fork 15
/
jest.config.ts
42 lines (40 loc) · 984 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
40
41
42
import type { JestConfigWithTsJest } from 'ts-jest'
import { jsWithTsESM as tsjPreset } from 'ts-jest/presets';
const config: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
testMatch: [
'**/tests/**/*.test.(ts|tsx)'
],
testTimeout: 15 * 1000,
transform: {
...tsjPreset.transform,
},
moduleNameMapper: {
'\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules'
},
testPathIgnorePatterns: [
'/node_modules/'
],
coverageDirectory: './coverage/',
collectCoverage: true,
collectCoverageFrom: [
'packages/**/src/**/*.(js|ts|tsx)',
'!packages/**/src/**/*.d.ts'
],
"coveragePathIgnorePatterns": [
'packages/utils/src/index.ts',
],
coverageThreshold: {
global: {
branches: 58,
functions: 59,
lines: 75,
statements: 74
}
},
restoreMocks: true,
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
bail: false
};
export default config;