mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-25 16:03:48 +00:00
Setup Jest for Vue
This commit is contained in:
@ -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',
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user