From c1046e2a8208e9becf62fcc9957c2ac1e2b89f8b Mon Sep 17 00:00:00 2001 From: Devon Powell Date: Thu, 2 May 2024 10:25:38 -0400 Subject: [PATCH] fix: remove uneeded code (#213) --- src/helpers/report-builder.cjs | 39 +++++++++------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/src/helpers/report-builder.cjs b/src/helpers/report-builder.cjs index f9a10ce..ae66f0d 100644 --- a/src/helpers/report-builder.cjs +++ b/src/helpers/report-builder.cjs @@ -139,15 +139,11 @@ class ReportSummaryBuilder extends ReportBuilderBase { } setPassed(options) { - this.setStatus('passed', options); - - return this; + return this.setStatus('passed', options); } setFailed(options) { - this.setStatus('failed', options); - - return this; + return this.setStatus('failed', options); } setCount(status, count, options) { @@ -157,27 +153,19 @@ class ReportSummaryBuilder extends ReportBuilderBase { } setCountPassed(count, options) { - this.setCount('passed', count, options); - - return this; + return this.setCount('passed', count, options); } setCountFlaky(count, options) { - this.setCount('flaky', count, options); - - return this; + return this.setCount('flaky', count, options); } setCountSkipped(count, options) { - this.setCount('skipped', count, options); - - return this; + return this.setCount('skipped', count, options); } setCountFailed(count, options) { - this.setCount('failed', count, options); - - return this; + return this.setCount('failed', count, options); } } @@ -241,21 +229,15 @@ class ReportDetailBuilder extends ReportBuilderBase { } setPassed(options) { - this.setStatus('passed', options); - - return this; + return this.setStatus('passed', options); } setSkipped(options) { - this.setStatus('skipped', options); - - return this; + return this.setStatus('skipped', options); } setFailed(options) { - this.setStatus('failed', options); - - return this; + return this.setStatus('failed', options); } incrementRetries() { @@ -269,10 +251,9 @@ class ReportDetailBuilder extends ReportBuilderBase { } addDuration(duration) { - this._setNestedProperty('duration', 'final', duration, { override: true }); this._accumulateNestedProperty('duration', 'total', duration); - return this; + return this.setDurationFinal(duration, { override: true }); } setDurationTotal(duration, options) {