-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
44 lines (40 loc) · 1.26 KB
/
jest.config.ts
File metadata and controls
44 lines (40 loc) · 1.26 KB
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
41
42
43
44
import type { JestConfigWithTsJest } from 'ts-jest';
import { pathsToModuleNameMapper } from "ts-jest";
import tsconfig from "./tsconfig.json";
const { compilerOptions } = tsconfig;
const config: JestConfigWithTsJest = {
verbose: true,
preset: "ts-jest/presets/default-esm",
moduleFileExtensions: ["js", "json", "ts", "d.ts"],
displayName: "Unit Tests: NodeVault",
coverageDirectory: "coverage",
collectCoverage: true,
coverageProvider: "v8",
coverageReporters: ["html", "lcov"],
reporters: [
"default",
["jest-junit", {
"suiteName": "Unit Tests: NodeVault",
"outputDirectory": ".",
"outputName": "junit.unit.xml",
"uniqueOutputName": "false",
"classNameTemplate": "{classname}-{title}",
"titleTemplate": "{classname}-{title}",
"ancestorSeparator": " › ",
"usePathForSuiteName": "true"
}]
],
testPathIgnorePatterns: [
"node_modules/",
"test/resources/",
"test/integration/"
],
detectOpenHandles: true,
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { useESM: true }),
transform: {},
extensionsToTreatAsEsm: [".jsx", ".ts", ".tsx"],
roots: ['<rootDir>/test'],
testMatch: ['**/*.test.ts']
}
export default config;