-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.js
29 lines (28 loc) · 916 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
const { pathsToModuleNameMapper } = require('ts-jest/utils')
const { compilerOptions } = require('./tsconfig')
module.exports = {
roots: ['<rootDir>/Tasks', '<rootDir>/Tests'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
collectCoverage: true,
coverageDirectory: './coverage/',
collectCoverageFrom: [
'./Tasks/**/*.ts',
'!**/*.d.ts',
// Some of these files need to be ignored since it's a copy from common folder
// and have been tested once
'!./Tasks/DigitalOceanSpacesUpload/common/utils/filterFiles.ts',
'!./Tasks/DigitalOceanSpacesDownload/common/utils/filterFiles.ts',
],
globals: {
'ts-jest': {
isolatedModules: true
}
}
}