Commit b8450b8b authored by Annabel Gray's avatar Annabel Gray

Merge branch '48912-vue-files-without-tests-missing-in-coverage-report' into 'master'

Include Vue files without tests in coverage report

Closes #48912

See merge request gitlab-org/gitlab-ce!20431
parents adb43719 0443c708
...@@ -166,13 +166,13 @@ if (process.env.BABEL_ENV === 'coverage') { ...@@ -166,13 +166,13 @@ if (process.env.BABEL_ENV === 'coverage') {
]; ];
describe('Uncovered files', function() { describe('Uncovered files', function() {
const sourceFiles = require.context('~', true, /\.js$/); const sourceFiles = require.context('~', true, /\.(js|vue)$/);
$.holdReady(true); $.holdReady(true);
sourceFiles.keys().forEach(function(path) { sourceFiles.keys().forEach(function(path) {
// ignore if there is a matching spec file // ignore if there is a matching spec file
if (testsContext.keys().indexOf(`${path.replace(/\.js$/, '')}_spec`) > -1) { if (testsContext.keys().indexOf(`${path.replace(/\.(js|vue)$/, '')}_spec`) > -1) {
return; return;
} }
......
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