forked from Anatole-Godard/rsr-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (27 loc) · 832 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
28
const path = require("path");
const { pathsToModuleNameMapper } = require("ts-jest");
// In the following statement, replace `./tsconfig` with the path to your `tsconfig` file
// which contains the path mapping (ie the `compilerOptions.paths` option):
const { compilerOptions } = require("./tsconfig");
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
roots: ["."],
rootDir: ".",
preset: "ts-jest",
testEnvironment: "node",
collectCoverageFrom: [
"**/*.{js,jsx,ts,tsx}",
"!**/*.d.ts",
"!**/node_modules/**",
],
testPathIgnorePatterns: [
path.join("tests", "e2e"),
"node_modules",
".next",
"pages",
],
coverageReporters: ["html", "text-summary"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: "<rootDir>/",
}),
};