-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
40 lines (38 loc) · 1.01 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
38
39
40
/* eslint-disable @typescript-eslint/no-var-requires */
const tsconfig = require("tsconfig-extends");
const { pathsToModuleNameMapper } = require("ts-jest/utils");
const compilerOptions = tsconfig.load_file_sync(
"./tsconfig.jest.json",
__dirname,
);
module.exports = {
testEnvironment: "jsdom",
setupFiles: ["fake-indexeddb/auto"],
setupFilesAfterEnv: ["jest-extended"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: "<rootDir>/packages/",
}),
moduleFileExtensions: ["ts", "js"],
testRegex: "\\.spec.ts$",
rootDir: ".",
transform: {
"^.+\\.ts$": "ts-jest",
},
globals: {
"ts-jest": {
tsconfig: "tsconfig.jest.json",
},
},
coverageReporters: ["json", "lcov", "text-summary"],
coverageDirectory: "coverage",
collectCoverageFrom: [
"packages/**/*.ts",
"!packages/**/*.d.ts",
"!packages/**/index.ts",
"!packages/**/*.interface.ts",
"!**/node_modules/**",
"!**/__stubs__/**",
"!**/__fixture__/**",
"!integration/*",
],
};