-
Notifications
You must be signed in to change notification settings - Fork 71
/
jest.config.js
37 lines (36 loc) · 1.15 KB
/
jest.config.js
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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { pathsToModuleNameMapper } = require('ts-jest/utils');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { compilerOptions } = require('./tsconfig');
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'node',
testMatch: ['<rootDir>/app/**/*.spec.ts'],
verbose: true,
collectCoverageFrom: [
'<rootDir>/app/**/*.ts',
'<rootDir>/app/**/*.tsx',
'!<rootDir>/app/main.dev.ts',
'!<rootDir>/app/menu.ts',
],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json'],
moduleDirectories: ['node_modules', 'app/node_modules'],
setupFiles: ['./internals/scripts/CheckBuildsExist.js'],
setupFilesAfterEnv: ['<rootDir>/app/tests/_setup-tests.ts'],
coverageReporters: ['html', 'json-summary'],
globals: {
api: true,
CONFIG: true,
'ts-jest': {
tsconfig: 'tsconfig.tests.json',
diagnostics: {
ignoreCodes: [
6133, 2304,
// Object is possibly `null`
2531,
],
},
},
},
};