-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
32 lines (29 loc) · 947 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
const { pathsToModuleNameMapper } = require('ts-jest');
const tsConfigPaths = {
'@/*': ['src/*'],
'@tests/*': ['tests/*'],
};
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__test__/.*|/tests/.*|(\\.|/)(test|spec))\\.[tj]sx?$',
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/build/', '/coverage/', '/tests/TestClasses/', '/tests/TestData/'],
moduleFileExtensions: ['js', 'ts'],
moduleNameMapper: pathsToModuleNameMapper(tsConfigPaths, { prefix: `${__dirname}/` }),
coverageDirectory: './coverage',
coverageReporters: ['html-spa', 'text'],
collectCoverageFrom: [
'src/*.js',
'src/*.ts',
'src/**/*.js',
'src/**/*.ts',
'!**/build/**',
'!**/dist/**',
'!**/node_modules/**',
'!**/tests/**',
'!**/vendor/**',
],
};