2018-03-18 23:41:14 +00:00
|
|
|
module.exports = {
|
2018-03-19 15:49:16 +00:00
|
|
|
testEnvironment: 'node',
|
2018-10-17 21:28:25 +00:00
|
|
|
|
2018-07-24 10:12:46 +00:00
|
|
|
expand: true,
|
2018-10-17 21:28:25 +00:00
|
|
|
|
|
|
|
forceExit: true,
|
|
|
|
|
2018-07-24 10:37:56 +00:00
|
|
|
// https://github.com/facebook/jest/pull/6747 fix warning here
|
2018-08-10 15:55:39 +00:00
|
|
|
// But its performance overhead is pretty bad (30+%).
|
|
|
|
// detectOpenHandles: true
|
2018-10-17 21:28:25 +00:00
|
|
|
|
2019-01-28 13:52:27 +00:00
|
|
|
setupFilesAfterEnv: ['./test/utils/setup'],
|
2018-10-17 21:28:25 +00:00
|
|
|
|
|
|
|
coverageDirectory: './coverage',
|
|
|
|
|
|
|
|
collectCoverageFrom: [
|
2018-10-30 20:42:53 +00:00
|
|
|
'**/packages/*/src/**/*.js'
|
2018-10-17 21:28:25 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
coveragePathIgnorePatterns: [
|
2018-10-30 20:42:53 +00:00
|
|
|
'node_modules/(?!(@nuxt|nuxt))',
|
|
|
|
'packages/webpack/src/config/plugins/vue'
|
2018-10-17 21:28:25 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
testPathIgnorePatterns: [
|
2018-10-30 20:42:53 +00:00
|
|
|
'node_modules/(?!(@nuxt|nuxt))',
|
2018-10-17 21:28:25 +00:00
|
|
|
'test/fixtures/.*/.*?/',
|
|
|
|
'examples/.*'
|
|
|
|
],
|
|
|
|
|
2018-10-30 20:42:53 +00:00
|
|
|
transformIgnorePatterns: [
|
|
|
|
'node_modules/(?!(@nuxt|nuxt))'
|
|
|
|
],
|
|
|
|
|
2018-10-29 15:48:40 +00:00
|
|
|
transform: {
|
2019-01-04 19:30:28 +00:00
|
|
|
'^.+\\.ts$': 'ts-jest',
|
2018-10-29 15:48:40 +00:00
|
|
|
'^.+\\.js$': 'babel-jest',
|
|
|
|
'.*\\.(vue)$': 'vue-jest'
|
|
|
|
},
|
|
|
|
|
2018-10-17 21:28:25 +00:00
|
|
|
moduleFileExtensions: [
|
2019-01-04 19:30:28 +00:00
|
|
|
'ts',
|
2018-10-17 21:28:25 +00:00
|
|
|
'js',
|
|
|
|
'json'
|
2018-10-31 18:39:50 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
reporters: [
|
2018-11-08 00:05:41 +00:00
|
|
|
'default'
|
|
|
|
].concat(process.env.JEST_JUNIT_OUTPUT ? ['jest-junit'] : [])
|
2018-03-18 23:41:14 +00:00
|
|
|
}
|