-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathjest.config.ts
39 lines (37 loc) · 908 Bytes
/
jest.config.ts
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
import type { Config } from "jest"
const config: Config = {
verbose: true,
preset: "ts-jest/presets/default-esm",
extensionsToTreatAsEsm: [".ts"],
transform: {
tsconfig: "<rootDir>/tsconfig.test.json",
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
},
projects: [
{
clearMocks: true,
displayName: "serverless-ses-template",
testRegex: "(/tests/.*|(\\.|/)test)\\.ts$",
testPathIgnorePatterns: ["./dist", ".eslintrc.cjs"],
moduleDirectories: ["node_modules", "node_modules/.pnpm", "src"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
},
],
coverageReporters: ["text"],
coverageThreshold: {
global: {
lines: 100,
},
},
collectCoverage: true,
coverageDirectory: "coverage",
collectCoverageFrom: ["!**/dist/**", "src/**", "!src/types.ts"],
}
export default config