-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (33 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
31
32
33
34
35
36
/**
* @Author: Rostislav Simonik <[email protected]>
* @Date: 2021-05-15T12:05:47+02:00
* @Copyright: Technology Studio
**/
const { pathsToModuleNameMapper } = require('ts-jest')
const { compilerOptions } = require('./tsconfig.json');
const { defaults } = require('jest-config');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: [
'<rootDir>/__tests__/Tests/**/?(*.)(spec|test).ts'
],
transformIgnorePatterns: [
'/node_modules/(?!@txo).+\\.js$'
],
testPathIgnorePatterns: [
'/node_modules/'
],
setupFiles: [
'<rootDir>/__tests__/Setup.ts'
],
moduleFileExtensions: [
...defaults.moduleFileExtensions,
],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: './__tests__/tsconfig.json'
}]
},
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths , { prefix: '<rootDir>/' } ),
}