-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
24 lines (23 loc) · 899 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
// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-commonjs
const { pathsToModuleNameMapper } = require('ts-jest/utils')
// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-commonjs
const { compilerOptions } = require('./tsconfig')
// eslint-disable-next-line import/no-commonjs
module.exports = {
moduleFileExtensions: ['js', 'json', 'ts'],
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: compilerOptions.baseUrl,
testRegex: '.spec.ts$',
collectCoverageFrom: ['src/**/*.{js,jsx,tsx,ts}', '!**/node_modules/**'],
coverageReporters: ['json', 'lcov'],
coverageDirectory: '../coverage',
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
testURL: 'http://localhost/',
transformIgnorePatterns: ['/node_modules/'],
globals: {
'ts-jest': {
compiler: 'ttypescript',
},
},
}