-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.base.js
33 lines (32 loc) · 1004 Bytes
/
jest.config.base.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
/** @type {import('@swc/core').Config} */
const swcConfig = {
jsc: {
parser: {
syntax: "typescript",
decorators: true,
},
target: "es2022",
loose: false,
externalHelpers: false,
// Requires v1.2.50 or upper and requires target to be es2016 or upper.
keepClassNames: false,
},
minify: false,
};
/** @type {import('jest').Config} */
// eslint-disable-next-line no-undef
module.exports = {
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest", swcConfig],
},
transformIgnorePatterns: ["<rootDir>/node_modules/"],
testEnvironment: "node",
testTimeout: 10000,
collectCoverage: true,
collectCoverageFrom: ["src/**/*.ts"],
coveragePathIgnorePatterns: ["node_modules", "__tests__", "__test__", "testing"],
coverageReporters: ["html", "text", "text-summary", "cobertura"],
testRegex: "(\\.|/)(test|spec)\\.[jt]sx?$",
// v3.0 is broken so disable it
prettierPath: null,
};