forked from leather-io/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
30 lines (29 loc) · 900 Bytes
/
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
const { pathsToModuleNameMapper } = require('ts-jest/utils');
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'],
coverageReporters: ['html'],
globals: {
api: true,
CONFIG: true,
'ts-jest': {
tsconfig: 'tsconfig.tests.json',
diagnostics: {
ignoreCodes: [6133, 2304],
},
},
},
};