-
-
Notifications
You must be signed in to change notification settings - Fork 635
/
jest.config.js
50 lines (50 loc) · 1.38 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
export default {
collectCoverageFrom: [
"packages/*/src/**/*.ts",
"!**/*.ts.js",
"!**/inferno-utils/**/*",
"!**/inferno-router/**/utils.ts",
],
coverageDirectory: "coverage",
coverageReporters: ["html", "lcov", "text"],
globals: {
usingJSDOM: true,
usingJest: true
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
moduleNameMapper: {
"^inferno-router/utils": "<rootDir>/packages/inferno-router/src/utils.ts",
"^inferno(.*?)$": "<rootDir>/packages/inferno$1/src/index.ts",
"mobx": "<rootDir>/node_modules/mobx/dist/mobx.cjs.development.js"
},
setupFiles: ["<rootDir>/scripts/test/requestAnimationFrame.ts"],
testMatch: [
"<rootDir>/packages/*/__tests__/**/*spec.@(js|ts)?(x)",
"<rootDir>/packages/*/__tests__/**/*spec.server.@(js|ts)?(x)"
],
testPathIgnorePatterns: [
"<rootDir>/packages/inferno/__tests__/transition.spec.tsx",
],
transform: {
"^.+\\.(t|j)sx?$": ['@swc/jest', {
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
},
"experimental": {
"plugins": [
["swc-plugin-inferno", {
"pure": false
}]
],
},
"target": "es2022",
"loose": true
}
}],
},
testEnvironment: "jsdom",
testRunner: "jest-jasmine2",
reporters: [["jest-silent-reporter", { "useDots": true }]]
}