forked from alibaba/ice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
33 lines (31 loc) · 859 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
30
31
32
33
const { getHookFiles } = require('./packages/icejs/lib/require-hook');
const moduleNameMapper = getHookFiles().reduce((mapper, [id, value]) => {
mapper[`^${id}$`] = value;
return mapper;
}, {});
module.exports = {
moduleNameMapper,
// 'testRunner': 'jest-circus/runner',
'coverageDirectory': './coverage/',
'testEnvironment': 'node',
'collectCoverage': true,
'collectCoverageFrom': ['packages/*/lib/*.{js,jsx}'],
'coveragePathIgnorePatterns': [
'<rootDir>/node_modules/'
],
'transform': {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': 'ts-jest'
},
'roots': [
'<rootDir>/packages',
'<rootDir>/test',
],
'testPathIgnorePatterns': [
'/node_modules/',
'/lib/',
'create-cli-utils/',
],
// copy from jest config
'testMatch': [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)' ],
};