minor refactor on reporters definition
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2022-05-13 12:44:21 +02:00
parent fa55263516
commit 8b95150437
1 changed files with 7 additions and 7 deletions

View File

@ -28,10 +28,7 @@ async function test() {
app.boot(bootOptions);
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
const reporters = [];
reporters.push(new SpecReporter({
const specReporter = new SpecReporter({
spec: {
displaySuccessful: isCI,
displayPending: isCI
@ -39,11 +36,14 @@ async function test() {
summary: {
displayPending: false,
}
}));
});
const reporters = [specReporter];
if (isCI) {
const junitReporter = require('jasmine-reporters');
reporters.push(new junitReporter.JUnitXmlReporter());
const JunitReporter = require('jasmine-reporters');
const junitReporter = new JunitReporter.JUnitXmlReporter();
reporters.push(junitReporter);
}
const Jasmine = require('jasmine');