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