-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
25 lines (24 loc) · 731 Bytes
/
Copy pathjest.config.js
File metadata and controls
25 lines (24 loc) · 731 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
const { pathsToModuleNameMapper } = require("ts-jest");
const {
compilerOptions: { paths }
} = require("./tsconfig.json");
module.exports = {
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
transform: {
"^.+\\.tsx?$": ["ts-jest", {
tsconfig: "tsconfig.spec.json",
useESM: true
}]
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
roots: ["<rootDir>/src"],
testRegex: "./src/.*\\.(test|spec)?\\.(ts|ts)$",
coverageDirectory: "./coverage",
moduleNameMapper: pathsToModuleNameMapper(paths, {
prefix: "<rootDir>"
}),
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
clearMocks: true,
maxWorkers: 1
};