forked from num-codex/codex-feasibility-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (35 loc) · 1.04 KB
/
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
28
29
30
31
32
33
34
35
36
37
const { pathsToModuleNameMapper } = require("ts-jest/utils");
const { compilerOptions } = require("./tsconfig");
module.exports = {
preset: "jest-preset-angular",
roots: ["<rootDir>/src/"],
testMatch: ["**/+(*.)+(spec).+(ts)"],
setupFilesAfterEnv: ["<rootDir>/src/test.ts"],
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/src/app/**/*.ts',
'!<rootDir>/src/app/**/index.ts',
'!<rootDir>/src/app/**/*.module.ts',
'!<rootDir>/src/app/**/font-awesome-icons.ts',
'!<rootDir>/src/playground/**',
'!<rootDir>/src/main.playground.ts'
],
coverageReporters: [
"html",
"text-summary",
"json",
"lcov",
"text",
"clover",
"cobertura"
],
reporters: ["default", "jest-junit"],
coverageDirectory: "<rootDir>/coverage",
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
prefix: "<rootDir>/",
}),
moduleNameMapper: {
'^(.*)/environments/(.*)$': '<rootDir>/src/environments/environment.test.ts',
'^lodash-es$': '<rootDir>/node_modules/lodash/index.js'
},
};