in src/reporters/base.ts [100:127]
onEnd() {
const { failed, succeeded, skipped, registered } = this.metrics;
const total = failed + succeeded + skipped;
if (this.dryRun) {
this.write(`\n${registered} journey(s) registered`);
return;
}
let message = '\n';
if (total === 0) {
message = 'No tests found!';
message += ` (${renderDuration(now())} ms) \n`;
this.write(message);
return;
}
message += succeeded > 0 ? green(` ${succeeded} passed`) : '';
message += failed > 0 ? red(` ${failed} failed`) : '';
message += skipped > 0 ? cyan(` ${skipped} skipped`) : '';
message += ` (${renderDuration(now())} ms) \n`;
this.write(message);
// flushSync is used here to make sure all the data from the underlying
// SonicBoom stream buffer is completely written to the fd before closing
// the process
this.stream.flushSync();
}