Commit 4b3573f2 authored by Winnie Hellmann's avatar Winnie Hellmann

Setup Jest for Vue

parent b388111f
......@@ -14,6 +14,7 @@ if (process.env.CI) {
// eslint-disable-next-line import/no-commonjs
module.exports = {
testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'],
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper: {
'^~(.*)$': '<rootDir>/app/assets/javascripts$1',
'^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1',
......@@ -26,4 +27,8 @@ module.exports = {
reporters,
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js',
restoreMocks: true,
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
},
};
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment