Skip to content

Commit

Permalink
Show Seed if requested. Fixes #37 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkalmar authored May 22, 2024
1 parent 9119a33 commit 173ebb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SilentReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SilentReporter {
this.showWarnings =
!!process.env.JEST_SILENT_REPORTER_SHOW_WARNINGS ||
!!options.showWarnings;
this.showSeed = !!globalConfig.showSeed
}

onRunStart() {
Expand All @@ -24,6 +25,9 @@ class SilentReporter {
if (this.useDots) {
this.stdio.log('\n');
}
if (this.showSeed) {
this.stdio.log(`Seed: ${this._globalConfig.seed}`)
}
this.stdio.close();
}

Expand Down

0 comments on commit 173ebb2

Please sign in to comment.