-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.ts
28 lines (26 loc) · 1004 Bytes
/
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
import type { Config } from "@jest/types";
const config: Config.InitialOptions = {
preset: "ts-jest",
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
},
runtime: "@side/jest-runtime",
testEnvironment: "node",
setupFiles: ["dotenv/config", "./src/jest/jestInitialSetup.ts"],
setupFilesAfterEnv: ["./src/jest/jestSetupFilesAfterEnv.ts"],
modulePathIgnorePatterns: ["dist", "__tests__/mock"],
moduleNameMapper: {
"^@providers/(.*)$": "<rootDir>/src/providers/$1",
"^@entities/(.*)$": "<rootDir>/src/entities/$1",
"^@repositories/(.*)$": "<rootDir>/src/repositories/$1",
"^@useCases/(.*)$": "<rootDir>/src/useCases/$1",
"^@data/(.*)$": "<rootDir>/src/providers/data/$1",
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transformIgnorePatterns: ["/node_modules/"],
testPathIgnorePatterns: ["/node_modules/", "/__tests__/mock/"],
workerIdleMemoryLimit: "2000MB",
logHeapUsage: true,
bail: true, // Stop the test run when the first test fails
};
export default config;