summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Gray <annabel.m.gray@gmail.com>2018-07-12 20:10:59 +0000
committerAnnabel Gray <annabel.m.gray@gmail.com>2018-07-12 20:10:59 +0000
commitb8450b8bd7a441728544a295c75dd2cae4b5fe19 (patch)
tree73ac83fb36f09959164f77bd26ac341a807e3cfb
parentadb43719d3210cdc7c96f6d49e9cec942433ffc4 (diff)
parent0443c708c0db117dc76b1a3683ddb0fb76479511 (diff)
downloadgitlab-ce-b8450b8bd7a441728544a295c75dd2cae4b5fe19.tar.gz
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
-rw-r--r--spec/javascripts/test_bundle.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 0eff98bcc9d..a0ca8f8b4c3 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -166,13 +166,13 @@ if (process.env.BABEL_ENV === 'coverage') {
];
describe('Uncovered files', function() {
- const sourceFiles = require.context('~', true, /\.js$/);
+ const sourceFiles = require.context('~', true, /\.(js|vue)$/);
$.holdReady(true);
sourceFiles.keys().forEach(function(path) {
// 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;
}