JUnit reporter not loaded when not used

This commit is contained in:
Juan Ferrer 2019-01-24 12:29:10 +01:00
parent f9c79241ae
commit 6a1e1439e0
1 changed files with 3 additions and 2 deletions

View File

@ -71,11 +71,12 @@ function backendUnitTest() {
]; ];
const jasmine = require('gulp-jasmine'); const jasmine = require('gulp-jasmine');
const reporters = require('jasmine-reporters');
let options = {errorOnFail: false}; let options = {errorOnFail: false};
if (argv.junit || argv.j) if (argv.junit || argv.j) {
const reporters = require('jasmine-reporters');
options.reporter = new reporters.JUnitXmlReporter(); options.reporter = new reporters.JUnitXmlReporter();
}
return gulp.src(specFiles) return gulp.src(specFiles)
.pipe(jasmine(options)) .pipe(jasmine(options))