-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjest.config.js
35 lines (35 loc) · 1.09 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
"roots": [
"<rootDir>/src"
],
// configured here to allow tsx, ts, js and jsx to ts-jest
"transform": {
"^.+\\.(ts|tsx|js|jsx)$": "ts-jest",
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
// https://jestjs.io/docs/en/configuration#snapshotserializers-arraystring
"snapshotSerializers": ["enzyme-to-json/serializer"],
// https://jestjs.io/docs/en/configuration#setupfiles-array
// "setupFilesAfterEnv": ['<rootDir>/src/setupTests.js'],
setupFilesAfterEnv: [
'<rootDir>/src/setupTests.js',
// "@testing-library/react/cleanup-after-each",
// "@testing-library/jest-dom/extend-expect"
],
// https://jestjs.io/docs/en/configuration.html#transformignorepatterns-arraystring
"transformIgnorePatterns": [
"/node_modules/(?!antd|@ant-design|rc-.+?|@babel/runtime).+(js|jsx)$"
]
// Module file extensions for importing
// moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
};