diff options
Diffstat (limited to 'spec/javascripts/test_bundle.js')
-rw-r--r-- | spec/javascripts/test_bundle.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index 14ace66c2f1..8f4af90edd7 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -165,48 +165,3 @@ describe('test errors', () => { } }); }); - -// if we're generating coverage reports, make sure to include all files so -// that we can catch files with 0% coverage -// see: https://github.com/deepsweet/istanbul-instrumenter-loader/issues/15 -if (process.env.BABEL_ENV === 'coverage') { - // exempt these files from the coverage report - const troubleMakers = [ - './pages/admin/application_settings/general/index.js', - './geo_designs/index.js', - ]; - - describe('Uncovered files', function() { - const sourceFilesContexts = [require.context('~', true, /\.(js|vue)$/)]; - - if (process.env.IS_EE) { - sourceFilesContexts.push(require.context('ee', true, /\.(js|vue)$/)); - } - - const allTestFiles = testContexts.reduce( - (accumulator, context) => accumulator.concat(context.keys()), - [], - ); - - $.holdReady(true); - - sourceFilesContexts.forEach(context => { - context.keys().forEach(path => { - // ignore if there is a matching spec file - if (allTestFiles.indexOf(`${path.replace(/\.(js|vue)$/, '')}_spec`) > -1) { - return; - } - - it(`includes '${path}'`, function() { - try { - context(path); - } catch (err) { - if (troubleMakers.indexOf(path) === -1) { - expect(err).toBeNull(); - } - } - }); - }); - }); - }); -} |