-
Notifications
You must be signed in to change notification settings - Fork 569
/
Copy pathjest.config.js
59 lines (55 loc) · 1.28 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const deepmerge = require('deepmerge');
const { resolve } = require('path');
const baseConfig = require('../../jest.config.base');
module.exports = deepmerge(baseConfig, {
collectCoverageFrom: [
'!./src/**/index.ts',
'!./src/types/global.ts',
'!./src/types/images.ts',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
projects: [
{
testMatch: [
'<rootDir>/src/jsx/validation.test.tsx',
'<rootDir>/src/jsx/jsx-runtime.test.tsx',
],
transform: {
'^.+\\.(t|j)sx?$': [
'ts-jest',
{
tsconfig: {
jsx: 'react-jsx',
jsxImportSource: resolve(__dirname, './src/jsx'),
},
},
],
},
},
{
testMatch: ['<rootDir>/**/*.test.ts', '<rootDir>/**/*.test.tsx'],
testPathIgnorePatterns: [
'<rootDir>/src/jsx/validation.test.tsx',
'<rootDir>/src/jsx/jsx-runtime.test.tsx',
],
transform: {
'^.+\\.(t|j)sx?$': [
'ts-jest',
{
tsconfig: {
jsx: 'react-jsxdev',
jsxImportSource: resolve(__dirname, './src/jsx'),
},
},
],
},
},
],
});