-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
42 lines (41 loc) · 1.06 KB
/
jest.config.js
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
const path = require('path');
module.exports = {
globals: {
'ts-jest': {
tsConfig: path.resolve(__dirname, 'packages/tsconfig.base.json'),
},
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
'\\.(svg)$': '<rootDir>/.config/jest/assetsTransformer.ts',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
testPathIgnorePatterns: ['node_modules'],
coveragePathIgnorePatterns: ['.*/lib/.*', '.*/es/.*', '.*/.build/.*'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
verbose: true,
collectCoverage: true,
collectCoverageFrom: [
'**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/index.{ts,tsx}',
'!**/serviceWorker.ts',
'!**/setupTests.ts',
'!**/*.d.ts',
'!**/lib',
'!**/es',
],
moduleNameMapper: {
'\\.(scss|css)$': '<rootDir>/.config/jest/styleMock.ts',
'\\.svg$': '<rootDir>/.config/jest/fileMock.ts',
},
coverageThreshold: {
global: {
branches: 70,
functions: 80,
lines: 70,
statements: 80,
},
},
// setupFiles: ['<rootDir>/.config/jest/setupFile.ts'],
};