vue3-yuanma/jest.config.js

28 lines
738 B
JavaScript
Raw Normal View History

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