-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjest.config.ts
More file actions
27 lines (26 loc) · 841 Bytes
/
jest.config.ts
File metadata and controls
27 lines (26 loc) · 841 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
// Set TEST environment to avoid process to exit with code 1 inside application
process.env.ENV = "UNITY_TEST";
module.exports = {
rootDir: ".",
verbose: false,
preset: "ts-jest/presets/js-with-babel",
testEnvironment: "node",
collectCoverageFrom: ["./src/**/*.ts"],
testMatch: ["**/tests/**/*.test.ts"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
modulePaths: ["<rootDir>", "./tests/fixtures"],
moduleDirectories: ["./tests/fixtures", "node_modules"],
modulePathIgnorePatterns: ["./tests/mocks", "./tests/manual_test", "./tests/dirTestFiles"],
projects: ["<rootDir>/tests"],
restoreMocks: true,
forceExit: true,
globals: {
"ts-jest": {
babelConfig: "./babel.config.js",
tsConfig: "./tests/tsconfig.json",
},
},
transform: {
"^.+\\.ts?$": "babel-jest",
},
};