2019-10-15 03:31:43 +08:00
|
|
|
const lernaJson = require('./lerna.json')
|
|
|
|
|
2018-09-20 03:36:56 +08:00
|
|
|
module.exports = {
|
|
|
|
preset: 'ts-jest',
|
2018-09-20 05:45:19 +08:00
|
|
|
globals: {
|
|
|
|
__DEV__: true,
|
2019-10-15 03:31:43 +08:00
|
|
|
__VERSION__: lernaJson.version,
|
2019-09-17 23:57:25 +08:00
|
|
|
__BROWSER__: false,
|
2019-09-04 10:25:38 +08:00
|
|
|
__JSDOM__: true,
|
2019-10-14 13:08:00 +08:00
|
|
|
__RUNTIME_COMPILE__: true,
|
2019-09-04 10:25:38 +08:00
|
|
|
__FEATURE_OPTIONS__: true,
|
2019-09-10 04:28:32 +08:00
|
|
|
__FEATURE_SUSPENSE__: true
|
2018-09-20 05:45:19 +08:00
|
|
|
},
|
2018-09-20 03:36:56 +08:00
|
|
|
coverageDirectory: 'coverage',
|
|
|
|
coverageReporters: ['html', 'lcov', 'text'],
|
2019-10-11 10:02:20 +08:00
|
|
|
collectCoverageFrom: [
|
|
|
|
'packages/*/src/**/*.ts',
|
|
|
|
'!packages/template-explorer/**'
|
|
|
|
],
|
2019-10-09 02:37:31 +08:00
|
|
|
watchPathIgnorePatterns: ['/node_modules/'],
|
2019-06-12 15:43:19 +08:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
|
2018-09-20 03:36:56 +08:00
|
|
|
moduleNameMapper: {
|
|
|
|
'^@vue/(.*?)$': '<rootDir>/packages/$1/src'
|
|
|
|
},
|
|
|
|
rootDir: __dirname,
|
2019-06-12 15:43:19 +08:00
|
|
|
testMatch: ['<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)']
|
2018-09-20 03:36:56 +08:00
|
|
|
}
|