-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
27 lines (26 loc) · 759 Bytes
/
jest.config.ts
File metadata and controls
27 lines (26 loc) · 759 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
// jest.config.js
import { defaults } from 'jest-config'
import { pathsToModuleNameMapper } from 'ts-jest'
import tsConfig from './tsconfig.json'
module.exports = {
transform: {
'.(ts|tsx)': 'ts-jest',
},
testEnvironment: 'jsdom',
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
// moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleFileExtensions: [...defaults.moduleFileExtensions],
coveragePathIgnorePatterns: ['/node_modules/', '/tests/'],
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95,
},
},
collectCoverageFrom: ['src/**/*.{js,ts}'],
moduleNameMapper: pathsToModuleNameMapper(tsConfig.compilerOptions.paths, {
prefix: '<rootDir>/',
}),
}