-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
27 lines (27 loc) · 922 Bytes
/
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
// root jest configuration file
module.exports = {
preset: "jest-preset-angular",
testEnvironment: "jsdom",
moduleFileExtensions: ["ts", "js", "html", "json"],
testMatch: ["**/__tests__/**/*.spec.ts", "**/*.spec.ts"],
transform: {
"^.+\\.(ts|js|html)$": [
"jest-preset-angular",
"ts-jest",
{
allowSyntheticDefaultImports: true,
},
],
'^.+\\.js$': 'babel-jest',
},
// collectCoverage: true,
// coverageReporters: ["html", "text-summary"],
coverageDirectory: "<rootDir>/coverage",
moduleNameMapper: {
"^@app/(.*)$": "<rootDir>/src/app/$1",
},
rootDir: ".", // ✅ Ensures Jest resolves paths relative to the monorepo root
testPathIgnorePatterns: ["/node_modules/", "/dist/"], // ✅ Ignore built files
modulePathIgnorePatterns: ["/dist/"], // ✅ Ensure Jest doesn't scan the `dist/` folder
// setupFilesAfterEnv: ["<rootDir>/setup-jest.ts"],
};