forked from authts/oidc-client-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.mjs
More file actions
25 lines (23 loc) · 719 Bytes
/
Copy pathjest.config.mjs
File metadata and controls
25 lines (23 loc) · 719 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
import yn from "yn";
const collectCoverage = yn(process.env.CI);
export default {
preset: "ts-jest",
clearMocks: true,
setupFilesAfterEnv: ["./test/setup.ts"],
testMatch: ["**/{src,test}/**/*.test.ts"],
testEnvironment: "./jest-environment-jsdom.cjs",
collectCoverage,
coverageReporters: collectCoverage ? ["lcov"] : ["lcov", "text"],
moduleNameMapper: {
"^jose": "jose", // map to jose cjs module otherwise jest breaks
},
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
// skip ts-jest type checking, incremental compilation with tsc is much faster
isolatedModules: true,
},
],
},
};