From 6a1e1439e09c2487c3c55082c325c4d3c4383c9f Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 24 Jan 2019 12:29:10 +0100 Subject: [PATCH] JUnit reporter not loaded when not used --- gulpfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6429a279ef..e5590bf069 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -71,11 +71,12 @@ function backendUnitTest() { ]; const jasmine = require('gulp-jasmine'); - const reporters = require('jasmine-reporters'); let options = {errorOnFail: false}; - if (argv.junit || argv.j) + if (argv.junit || argv.j) { + const reporters = require('jasmine-reporters'); options.reporter = new reporters.JUnitXmlReporter(); + } return gulp.src(specFiles) .pipe(jasmine(options))