vue3-yuanma/jest.config.js

35 lines
1.1 KiB
JavaScript
Raw Normal View History

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-11-04 16:24:22 +00:00
__TEST__: true,
2019-12-10 23:24:59 +00:00
__VERSION__: require('./package.json').version,
__BROWSER__: false,
2019-12-16 18:33:10 +00:00
__BUNDLER__: true,
__RUNTIME_COMPILE__: true,
2020-01-24 03:23:10 +00:00
__SSR__: false,
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',
2019-12-11 14:46:52 +00:00
'!packages/runtime-test/src/utils/**',
2019-11-04 23:41:40 +00:00
'!packages/template-explorer/**',
2019-12-11 14:46:52 +00:00
'!packages/size-check/**'
],
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)'],
testPathIgnorePatterns: process.env.SKIP_E2E
? // ignore example tests on netlify builds since they don't contribute
// to coverage and can cause netlify builds to fail
['/node_modules/', '/examples/__tests__']
: ['/node_modules/']
2018-09-19 19:36:56 +00:00
}