forked from NervJS/nerv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
45 lines (45 loc) · 1.42 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
42
43
44
45
module.exports = {
coverageDirectory: 'coverage',
coverageReporters: ['html', 'lcov', 'text'],
collectCoverageFrom: [
'packages/nerv/src/**/*.ts'
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
nervjs: '<rootDir>/packages/nerv/src',
'^nerv(.*?)$': '<rootDir>/packages/nerv$1/src'
},
mapCoverage: true,
globals: {
'ts-jest': {
tsConfigFile: {
target: 'es5',
removeComments: false,
preserveConstEnums: true,
moduleResolution: 'node',
experimentalDecorators: true,
noImplicitAny: false,
allowSyntheticDefaultImports: true,
strictNullChecks: true,
noImplicitThis: true,
sourceMap: true
}
}
},
rootDir: __dirname,
testMatch: [
// '<rootDir>/packages/nerv/__tests__/cloneElement.spec.js',
// '<rootDir>/packages/nerv/__tests__/component.spec.js',
// '<rootDir>/packages/nerv/__tests__/render.spec.js',
// '<rootDir>/packages/nerv/__tests__/lifecycle.spec.js',
// '<rootDir>/packages/nerv/__tests__/svg.spec.js'
// '<rootDir>/packages/nerv/__tests__/event.spec.js'
// '<rootDir>/packages/**/__tests__/**/*spec.js'
'<rootDir>/packages/**/__tests__/**/*spec.js'
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': '<rootDir>/node_modules/ts-jest/preprocessor.js'
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lodash-es)']
}