2019-09-15 22:49:40 -06:00
|
|
|
process.env.VUE_CLI_BABEL_TARGET_NODE = true;
|
|
|
|
process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true;
|
|
|
|
|
2019-07-08 07:32:03 -06:00
|
|
|
module.exports = {
|
2019-09-15 22:49:40 -06:00
|
|
|
collectCoverageFrom: [
|
|
|
|
'src/**/*.{js,vue}',
|
|
|
|
'!src/main.js',
|
|
|
|
'!**/node_modules/**'
|
|
|
|
],
|
|
|
|
coverageDirectory: '<rootDir>/tests/unit/coverage',
|
2019-07-08 07:32:03 -06:00
|
|
|
moduleFileExtensions: [
|
|
|
|
'js',
|
|
|
|
'jsx',
|
|
|
|
'json',
|
|
|
|
'vue'
|
|
|
|
],
|
|
|
|
moduleNameMapper: {
|
|
|
|
'^@/(.*)$': '<rootDir>/src/$1'
|
|
|
|
},
|
2019-09-15 22:49:40 -06:00
|
|
|
setupFilesAfterEnv: [
|
|
|
|
'<rootDir>/tests/unit/setup.js'
|
|
|
|
],
|
2019-07-08 07:32:03 -06:00
|
|
|
snapshotSerializers: [
|
2019-09-15 22:49:40 -06:00
|
|
|
'<rootDir>/tests/unit/serializer.js'
|
2019-07-08 07:32:03 -06:00
|
|
|
],
|
2019-09-15 22:49:40 -06:00
|
|
|
testEnvironment: 'jest-environment-jsdom-global',
|
2019-07-08 07:32:03 -06:00
|
|
|
testMatch: [
|
2019-09-15 22:49:40 -06:00
|
|
|
'**/tests/unit/**/*.test.js'
|
|
|
|
],
|
|
|
|
testPathIgnorePatterns: [
|
|
|
|
'<rootDir>/tests/e2e'
|
2019-07-08 07:32:03 -06:00
|
|
|
],
|
|
|
|
testURL: 'http://localhost/',
|
2019-09-15 22:49:40 -06:00
|
|
|
transform: {
|
|
|
|
'^.+\\.vue$': 'vue-jest',
|
|
|
|
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
|
|
|
|
'^.+\\.jsx?$': 'babel-jest'
|
|
|
|
},
|
|
|
|
transformIgnorePatterns: [
|
|
|
|
'/node_modules/'
|
|
|
|
],
|
2019-07-08 07:32:03 -06:00
|
|
|
watchPlugins: [
|
|
|
|
'jest-watch-typeahead/filename',
|
|
|
|
'jest-watch-typeahead/testname'
|
|
|
|
]
|
|
|
|
};
|