From 21255aa1e8c8369b7257841cc0ac7f1458abd315 Mon Sep 17 00:00:00 2001 From: Nico Jansen Date: Tue, 3 Apr 2018 07:25:14 +0200 Subject: [PATCH] fix(Progress reporter): don't prevent stryker from closing --- .../stryker/src/reporters/ProgressAppendOnlyReporter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/stryker/src/reporters/ProgressAppendOnlyReporter.ts b/packages/stryker/src/reporters/ProgressAppendOnlyReporter.ts index 24f0897771..eb08302145 100644 --- a/packages/stryker/src/reporters/ProgressAppendOnlyReporter.ts +++ b/packages/stryker/src/reporters/ProgressAppendOnlyReporter.ts @@ -9,8 +9,10 @@ export default class ProgressAppendOnlyReporter extends ProgressKeeper { onAllMutantsMatchedWithTests(matchedMutants: ReadonlyArray): void { super.onAllMutantsMatchedWithTests(matchedMutants); - this.timer = new Timer(); - this.intervalReference = setInterval(() => this.render(), 10000); + if (matchedMutants.length) { + this.timer = new Timer(); + this.intervalReference = setInterval(() => this.render(), 10000); + } } onAllMutantsTested(): void {