2018-09-19 15:36:56 -04:00
|
|
|
module.exports = {
|
|
|
|
preset: 'ts-jest',
|
2018-09-19 17:45:19 -04:00
|
|
|
globals: {
|
|
|
|
__DEV__: true,
|
2019-11-04 11:24:22 -05:00
|
|
|
__TEST__: true,
|
2019-12-10 18:24:59 -05:00
|
|
|
__VERSION__: require('./package.json').version,
|
2019-09-17 11:57:25 -04:00
|
|
|
__BROWSER__: false,
|
2019-12-16 13:33:10 -05:00
|
|
|
__BUNDLER__: true,
|
2019-10-14 01:08:00 -04:00
|
|
|
__RUNTIME_COMPILE__: true,
|
2020-02-13 18:50:36 -05:00
|
|
|
__GLOBAL__: false,
|
2020-01-29 09:49:17 -05:00
|
|
|
__NODE_JS__: true,
|
2019-09-03 22:25:38 -04:00
|
|
|
__FEATURE_OPTIONS__: true,
|
2019-09-09 16:28:32 -04:00
|
|
|
__FEATURE_SUSPENSE__: true
|
2018-09-19 17:45:19 -04:00
|
|
|
},
|
2018-09-19 15:36:56 -04:00
|
|
|
coverageDirectory: 'coverage',
|
|
|
|
coverageReporters: ['html', 'lcov', 'text'],
|
2019-10-10 22:02:20 -04:00
|
|
|
collectCoverageFrom: [
|
|
|
|
'packages/*/src/**/*.ts',
|
2019-12-11 09:46:52 -05:00
|
|
|
'!packages/runtime-test/src/utils/**',
|
2019-11-04 18:41:40 -05:00
|
|
|
'!packages/template-explorer/**',
|
2019-12-11 09:46:52 -05:00
|
|
|
'!packages/size-check/**'
|
2019-10-10 22:02:20 -04:00
|
|
|
],
|
2020-02-11 18:40:21 -05:00
|
|
|
watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
|
2019-06-12 15:43:19 +08:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
|
2018-09-19 15:36:56 -04:00
|
|
|
moduleNameMapper: {
|
2020-01-29 18:03:42 -05:00
|
|
|
'^@vue/(.*?)$': '<rootDir>/packages/$1/src',
|
|
|
|
vue: '<rootDir>/packages/vue/src'
|
2018-09-19 15:36:56 -04:00
|
|
|
},
|
|
|
|
rootDir: __dirname,
|
2019-12-23 10:51:28 -05:00
|
|
|
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 15:36:56 -04:00
|
|
|
}
|