-
Notifications
You must be signed in to change notification settings - Fork 108
/
jest.config.js
43 lines (41 loc) · 1.21 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
const {pathsToModuleNameMapper} = require('ts-jest/utils');
const tsconfig = require('./tsconfig');
const moduleNameMapper = pathsToModuleNameMapper(tsconfig.compilerOptions.paths, {prefix: '<rootDir>/'});
module.exports = {
preset: 'ts-jest',
rootDir: __dirname,
setupFilesAfterEnv: ['./scripts/setupJestEnv.ts'],
globals: {
DEV: true,
__DEV__: true,
__TEST__: true,
},
testURL: 'http://local.pages.tmall.com',
verbose: true,
collectCoverage: false,
coverageDirectory: 'coverage',
coverageReporters: ['html', 'json', 'lcov'],
collectCoverageFrom: ['packages/eva.js/lib/**/*.ts', '!packages/eva.js/lib/loader/resource-loader'],
moduleNameMapper,
transform: {
'^.+\\.(ts|js)?$': 'ts-jest',
},
transformIgnorePatterns: [],
watchPathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/.git/',
'packages/plugin-renderer-test',
'packages/eva-plugin-tiny',
'packages/plugin-alive',
],
moduleFileExtensions: ['ts', 'js', 'json'],
testMatch: ['<rootDir>/packages/**/__tests__/**/*.spec.ts'],
testPathIgnorePatterns: [
'/node_modules/',
'/resource-loader/',
'packages/plugin-renderer-test',
'packages/eva-plugin-tiny',
'packages/plugin-alive',
],
};