NWJS_Hour_Tracking/jest.config.js
2020-01-19 08:04:38 -05:00

47 lines
1.1 KiB
JavaScript

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