-
Notifications
You must be signed in to change notification settings - Fork 356
/
Copy pathjest.config.js
41 lines (40 loc) · 1.23 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
export default {
roots: ["<rootDir>"],
testEnvironment: "jsdom",
testMatch: [
"**/__tests__/**/*.+(ts|tsx|js)", // directories named __test__
"**/?(*.)+(spec|test).+(ts|tsx|js)", // files with the test.ts/test.tsx/test.js extension
],
testPathIgnorePatterns: [
"/node_modules/",
"/dist/",
"/doc/",
"/submodules/",
"/i18n/",
"/e2e-tests/",
],
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
"^.+goscorer.js$": "ts-jest",
goscorer: "ts-jest",
"^.+\\.css$": "jest-transform-stub",
},
moduleFileExtensions: ["js", "json", "jsx", "ts", "tsx", "d.ts", "node"],
modulePaths: [
"src/lib",
"src/components",
"src/views",
"src/data",
"src/compatibility",
"src",
"node_modules",
],
moduleNameMapper: {
"^@/(.*)": "<rootDir>/src/$1",
"^react-dynamic-help$": "<rootDir>/submodules/react-dynamic-help/src",
"^goban$": "<rootDir>/submodules/goban/src",
"^goscorer$": "<rootDir>/submodules/goban/src/third_party/goscorer/goscorer",
},
setupFiles: ["./setup-jest.js"],
setupFilesAfterEnv: ["jest-chain", "@testing-library/jest-dom"],
};