-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.ts
More file actions
39 lines (37 loc) · 953 Bytes
/
jest.config.ts
File metadata and controls
39 lines (37 loc) · 953 Bytes
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
import type { Config } from "jest";
const config: Config = {
preset: "ts-jest",
testEnvironment: "jsdom",
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/$1", // Changed from src/$1 to match tsconfig
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy",
"^.+\\.(jpg|jpeg|png|gif|webp|svg)$": "<rootDir>/__mocks__/fileMock.js",
},
transformIgnorePatterns: ["<rootDir>/node_modules/"],
modulePaths: ["<rootDir>"],
roots: ["<rootDir>"],
reporters: [
"default",
[
"jest-junit",
{
outputDirectory: "./reports",
outputName: "junit.xml",
},
],
[
"jest-html-reporter",
{
pageTitle: "Test Report",
outputPath: "reports/test-report.html",
includeFailureMsg: true,
includeConsoleLog: true,
},
],
],
};
export default config;