-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjest.node.config.ts
More file actions
37 lines (35 loc) · 937 Bytes
/
jest.node.config.ts
File metadata and controls
37 lines (35 loc) · 937 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
26
27
28
29
30
31
32
33
34
35
36
37
import type { InitialOptionsTsJest } from 'ts-jest/dist/types'
import { defaults as tsjPreset } from 'ts-jest/presets'
import { writeFileSync, existsSync, mkdirSync } from "fs";
// Empty browser data stub for nodejs tests.
if (!existsSync("./generated"))
mkdirSync("./generated");
writeFileSync("./generated/browserdata.json", "{}");
const config: InitialOptionsTsJest = {
rootDir: "./tests/src",
preset: 'ts-jest',
transform: {
...tsjPreset.transform,
'^.+\\.(ts|tsx)?$': 'ts-jest',
"^.+\\.(js|jsx)$": "babel-jest",
},
reporters: [
"default",
[
"jest-html-reporter", {
pageTitle: "Hive JS SDK NodeJS test report",
includeFailureMsg: true,
includeSuiteFailure: true
}
]
],
testEnvironment: "node",
testRunner: "jest-circus/runner",
globals: {
"ts-jest": {
"tsconfig": "./tsconfig.json"
}
},
testTimeout: 6000000
}
export default config