-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy pathjest.config.js
More file actions
25 lines (23 loc) · 811 Bytes
/
Copy pathjest.config.js
File metadata and controls
25 lines (23 loc) · 811 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
const { createDefaultPreset } = require('ts-jest');
const tsJestTransformCfg = createDefaultPreset().transform;
/** @type {import("jest").Config} **/
module.exports = {
testEnvironment: 'node',
transform: {
...tsJestTransformCfg,
},
globals: {
'ts-jest': {
// Treat TypeScript type errors as warnings rather than hard failures.
// This allows the test suite to run against files that have pre-existing
// type errors (e.g. schema mismatches not yet addressed) without blocking
// all integration tests that import those modules transitively.
diagnostics: { warnOnly: true },
},
},
moduleNameMapper: {
'^chalk$': '<rootDir>/src/__mocks__/chalk.ts',
},
roots: ['<rootDir>/src'],
setupFiles: ['./jest.setup.ts'],
};