-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.jest.config.ts
56 lines (55 loc) · 1.47 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import type { Config } from "jest";
const SSXCore = require("./packages/ssx-core/package.json");
const SSXSDK = require("./packages/ssx-sdk/package.json");
const SSXServer = require("./packages/ssx-server/package.json");
export default async (): Promise<Config> => ({
verbose: true,
collectCoverage: true,
bail: 0,
preset: "ts-jest",
clearMocks: true,
slowTestThreshold: 3,
coverageProvider: "v8",
testEnvironment: "node",
coverageDirectory: "coverage",
coverageReporters: ["json", "lcov", "text-summary"],
projects: [
{
displayName: SSXCore.name,
transform: {
"^.+\\.(ts|tsx)?$": [
"ts-jest",
{ tsconfig: "<rootDir>/packages/ssx-core/tsconfig.json" },
],
},
testMatch: [
"<rootDir>/packages/ssx-core/tests/?(*.)+(spec|test).[jt]s?(x)",
],
},
{
displayName: SSXSDK.name,
testEnvironment: "jsdom",
transform: {
"^.+\\.(ts|tsx)?$": [
"ts-jest",
{ tsconfig: "<rootDir>/packages/ssx-sdk/tsconfig.json" },
],
},
testMatch: [
"<rootDir>/packages/ssx-sdk/tests/?(*.)+(spec|test).[jt]s?(x)",
],
},
{
displayName: SSXServer.name,
transform: {
"^.+\\.(ts|tsx)?$": [
"ts-jest",
{ tsconfig: "<rootDir>/packages/ssx-server/tsconfig.json" },
],
},
testMatch: [
"<rootDir>/packages/ssx-server/tests/?(*.)+(spec|test).[jt]s?(x)",
],
},
],
});