Commit fd703ce0 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'winh-timeline-entry-jest' into 'master'

Migrate timeline_entry_item_spec.js to Jest

See merge request gitlab-org/gitlab-ce!23686
parents f2029dbb 3feab0a6
...@@ -14,6 +14,7 @@ if (process.env.CI) { ...@@ -14,6 +14,7 @@ if (process.env.CI) {
// eslint-disable-next-line import/no-commonjs // eslint-disable-next-line import/no-commonjs
module.exports = { module.exports = {
testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'], testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'],
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper: { moduleNameMapper: {
'^~(.*)$': '<rootDir>/app/assets/javascripts$1', '^~(.*)$': '<rootDir>/app/assets/javascripts$1',
'^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1', '^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1',
...@@ -26,4 +27,8 @@ module.exports = { ...@@ -26,4 +27,8 @@ module.exports = {
reporters, reporters,
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js', setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js',
restoreMocks: true, restoreMocks: true,
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
},
}; };
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
"karma-webpack": "^4.0.0-beta.0", "karma-webpack": "^4.0.0-beta.0",
"nodemon": "^1.18.4", "nodemon": "^1.18.4",
"prettier": "1.15.2", "prettier": "1.15.2",
"vue-jest": "^3.0.1",
"webpack-dev-server": "^3.1.10" "webpack-dev-server": "^3.1.10"
} }
} }
it('does nothing', () => {});
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