-
-
Notifications
You must be signed in to change notification settings - Fork 184
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (25 loc) · 807 Bytes
/
jest.config.js
File metadata and controls
27 lines (25 loc) · 807 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
const isCI = process.env.GITHUB_ACTIONS !== undefined;
/** @type {Partial<import("@jest/types").Config.DefaultOptions>} */
module.exports = {
testMatch: ["**/test/**/*.spec.ts"],
collectCoverageFrom: [
"<rootDir>/src/**/*",
"!<rootDir>/src/lualib/**/*",
// https://github.com/facebook/jest/issues/5274
"!<rootDir>/src/tstl.ts",
],
watchPathIgnorePatterns: ["cli/watch/[^/]+$", "src/lualib"],
setupFilesAfterEnv: ["<rootDir>/test/setup.ts"],
testEnvironment: "node",
testRunner: "jest-circus/runner",
preset: "ts-jest",
transform: {
"^.+\\.ts?$": [
"ts-jest",
{
tsconfig: "<rootDir>/test/tsconfig.json",
diagnostics: { warnOnly: !isCI },
},
],
},
};