-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.ts
49 lines (49 loc) · 1.1 KB
/
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
43
44
45
46
47
48
49
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
collectCoverage: true,
coverageReporters: ['json', 'lcov', 'text', 'html'],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
moduleNameMapper: {
'^.+\\.(css|less|scss)$': 'identity-obj-proxy',
},
modulePathIgnorePatterns: [
'<rootDir>/example',
'<rootDir>/dist',
'<rootDir>/coverage',
'<rootDir>/static',
'<rootDir>/stories',
],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/index.{ts,tsx}',
'!src/typings.d.ts',
'!<rootDir>/node_modules/',
'!<rootDir>/path/to/dir/',
'!src/generatePresentationalComponent/createPresentationalComponent.ts',
],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
outDir: './dist/',
sourceMap: true,
noImplicitAny: true,
module: 'commonjs',
target: 'es6',
jsx: 'react',
allowSyntheticDefaultImports: true,
esModuleInterop: true,
},
},
],
},
};