-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathjest.config.js
More file actions
26 lines (24 loc) · 852 Bytes
/
jest.config.js
File metadata and controls
26 lines (24 loc) · 852 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
const os = require('os');
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
testEnvironment: 'node',
preset: 'ts-jest',
roots: [ '<rootDir>/test/tests' ],
testRegex: '.*(test|spec)\\.tsx?$',
moduleFileExtensions: [ 'ts', 'tsx', 'mts', 'cts', 'js', 'jsx', 'mjs', 'cjs', 'json', 'node' ],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: './test/tsconfig.json' }],
},
modulePaths: [ '<rootDir>/node_modules' ],
// coveragePathIgnorePatterns: [
// 'src/installer/lib/system/errors.ts$'
// ],
globalSetup: '<rootDir>/test/src/prepare.ts',
globalTeardown: '<rootDir>/test/src/cleanup.ts',
testTimeout: 10000,
transformIgnorePatterns: [
'/node_modules/(?!(ts-transformer-keys|ts-transformer-enumerate|ts-nameof)/)'
],
maxConcurrency: os.cpus().length
};
module.exports = config;