-
Notifications
You must be signed in to change notification settings - Fork 267
/
jest.config.js
50 lines (50 loc) · 1.66 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
46
47
48
49
50
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-create-class': '<rootDir>/packages/nerv-create-class',
'nerv-devtools': '<rootDir>/packages/nerv-devtools',
'nerv-redux': '<rootDir>/packages/nerv-redux',
'nerv-shared': '<rootDir>/packages/nerv-shared',
'nerv-test-utils': '<rootDir>/packages/nerv-test-utils',
'nerv-utils': '<rootDir>/packages/nerv-utils'
},
globals: {
'ts-jest': {
tsConfig: {
target: 'es5',
removeComments: false,
preserveConstEnums: true,
moduleResolution: 'node',
experimentalDecorators: true,
noImplicitAny: false,
allowSyntheticDefaultImports: true,
strictNullChecks: true,
noImplicitThis: true,
sourceMap: true
},
diagnostics: false
}
},
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?$': 'ts-jest'
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lodash-es)']
}