Skip to content

Commit

Permalink
fix(reporters): don't register on exit handler unless reporter is sel…
Browse files Browse the repository at this point in the history
…ected
  • Loading branch information
tcort committed Nov 5, 2024
1 parent e517df4 commit e7c73af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reporters/junit.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ module.exports = async function junitReporter(err, results, opts, filenameForOut
}
}
}
process.on('exit', () => {
writeFileSync('junit.xml', doc.end({ prettyPrint: true }) + '\n');
console.error('\nWrote junit.xml');
});
};

process.on('exit', () => {
writeFileSync('junit.xml', doc.end({ prettyPrint: true }) + '\n');
console.error('\nWrote junit.xml');
})

0 comments on commit e7c73af

Please sign in to comment.