-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
44 lines (41 loc) · 1.19 KB
/
jest.config.ts
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
// /** @type {import('ts-jest').JestConfigWithTsJest} **/
// export default {
// testEnvironment: "node",
// transform: {
// "^.+.tsx?$": ["ts-jest",{}],
// collectCoverage: true,
// collectCoverageFrom: ['src/**/*.{ts,tsx}'],
// coverageDirectory: 'coverage',
// testEnvironment: 'jsdom',
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
// },
// };
export default {
// preset: "ts-jest",
// testEnvironment: "jest-environment-jsdom",
// transform: {
// "^.+\\.tsx?$": "ts-jest",
// // process `*.tsx` files with `ts-jest`
// },
// moduleNameMapper: {
// "\\.(gif|ttf|eot|svg|png)$": "<rootDir>/test/__ mocks __/fileMock.js",
// },
preset:"ts-jest",
testEnvironment: "jest-environment-jsdom",
setupFilesAfterEnv:["<rootDir>/setup-test.ts"],
transform: {
"^.+\\.tsx?$": "ts-jest"
},
moduleNameMapper: {
"\\.(css|less|scss|sass)":"identity-obj-proxy",
"\\.(gif|ttf|eot|svg|png|jpg|jpeg|webp)$": "<rootDir>/__mock__/fileMock.js"
},
collectCoverageFrom:[
"src/**/*.{js,ts,jsx,tsx}",
"!src/**/*.d.ts",
"!src/**/*.{spec,test}.{js,ts,jsx,tsx}",
"!**/node_modules/**",
"!vite.config.ts",
"!**/coverage/**"
]
};