-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
40 lines (39 loc) · 983 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
31
32
33
34
35
36
37
38
39
40
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.json');
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
collectCoverageFrom: ['src/**/*.ts?(x)'],
coveragePathIgnorePatterns: [
'/node_modules/',
'<rootDir>/src/cli.ts',
'<rootDir>/src/index.ts',
'<rootDir>/src/Logger.ts',
],
coverageReporters: ['text', 'html'],
errorOnDeprecated: true,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'mjs'],
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths || {}, {
prefix: process.cwd(),
}),
},
preset: 'ts-jest',
setupFiles: ['./tests/setupTests.ts'],
testEnvironment: 'node',
testPathIgnorePatterns: [
'/.vscode/',
'/dist/',
'/examples/',
'/haxe_libraries/',
'/lib/',
'/node_modules/',
],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
isolatedModules: true,
},
],
},
};