Nuxt/jest.config.js

51 lines
967 B
JavaScript
Raw Normal View History

2018-03-18 23:41:14 +00:00
module.exports = {
2018-03-19 15:49:16 +00:00
testEnvironment: 'node',
2018-07-24 10:12:46 +00:00
expand: true,
forceExit: true,
// https://github.com/facebook/jest/pull/6747 fix warning here
// But its performance overhead is pretty bad (30+%).
// detectOpenHandles: true
setupTestFrameworkScriptFile: './test/utils/setup',
coverageDirectory: './coverage',
collectCoverageFrom: [
'**/packages/*/src/**/*.js'
],
coveragePathIgnorePatterns: [
'node_modules/(?!(@nuxt|nuxt))',
'packages/webpack/src/config/plugins/vue'
],
testPathIgnorePatterns: [
'node_modules/(?!(@nuxt|nuxt))',
'test/fixtures/.*/.*?/',
'examples/.*'
],
transformIgnorePatterns: [
'node_modules/(?!(@nuxt|nuxt))'
],
transform: {
2019-01-04 19:30:28 +00:00
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest'
},
moduleFileExtensions: [
2019-01-04 19:30:28 +00:00
'ts',
'js',
'json'
],
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
}