Skip to content

Commit c6faeaa

Browse files
update jest config
1 parent ca9a7b6 commit c6faeaa

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

jest.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ module.exports = {
33

44
testEnvironment: 'jsdom',
55

6+
globals: {
7+
'ts-jest': {
8+
tsconfig: 'tsconfig.jest.json',
9+
}
10+
},
11+
612
// Test files are .js, .jsx, .ts and .tsx files inside of __tests__ folders and with a suffix of .test or .spec
713
testMatch: ['**/__tests__/**/?(*.)+(spec|test).[jt]s?(x)'],
814

tsconfig.jest.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"module": "commonjs",
5+
"jsx": "react",
6+
"lib": [
7+
"es2015",
8+
"dom"
9+
],
10+
"strict": false,
11+
"sourceMap": true,
12+
"esModuleInterop": true,
13+
"strictNullChecks": false,
14+
"resolveJsonModule": true
15+
},
16+
"include": [
17+
"src/**/*"
18+
],
19+
"exclude": [
20+
"node_modules"
21+
]
22+
}

0 commit comments

Comments
 (0)