forked from KRISACHAN/ying-datastructures-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
41 lines (41 loc) · 1.14 KB
/
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
37
38
39
40
41
const path = require('path')
const tsconfig = require('./tsconfig.json')
const moduleNameMapper = require('tsconfig-paths-jest')(tsconfig)
const jestConfig = {
rootDir: path.join(__dirname, ''),
roots: ['<rootDir>/tests'],
globals: {},
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/fileMock.js',
'\\.css$': 'identity-obj-proxy',
...moduleNameMapper,
},
coverageDirectory: 'coverage',
coverageReporters: ['lcov'],
testPathIgnorePatterns: ['/node_modules/'],
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/config/',
'/view/',
],
coverageReporters: [
'json',
'lcov',
'text',
'clover',
'html',
'text-summary',
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testMatch: [
'<rootDir>/tests/*.(ts|tsx|js|jsx)',
'<rootDir>/tests/**/*.(ts|tsx|js|jsx)',
],
collectCoverage: true,
}
module.exports = jestConfig