Skip to content

Commit

Permalink
feat(onRunComplete): Add timestamp to beginning of line when reportin…
Browse files Browse the repository at this point in the history
…g spec results (#76)

Co-authored-by: Tom M <tmcgee123@users.noreply.github.com>
  • Loading branch information
joshuaegclark and tmcgee123 committed Nov 25, 2022
1 parent f3205f6 commit a8f1273
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ var SpecReporter = function (baseReporterDecorator, formatError, config) {
}

if (browsers.length >= 1 && !results.disconnected && !results.error) {
var currentTime = reporterCfg.showSpecTiming ? (this.USE_COLORS ? (new Date().toLocaleString() + ' - ').yellow : new Date().toLocaleString() + ' - ') : '';
if (!results.failed) {
if (!this.suppressSummary) {
this.write(this.TOTAL_SUCCESS, results.success);
this.write(currentTime + this.TOTAL_SUCCESS, results.success);
}
} else {
if (!this.suppressSummary) {
this.write(this.TOTAL_FAILED, results.failed, results.success);
this.write(currentTime + this.TOTAL_FAILED, results.failed, results.success);
}
if (!this.suppressErrorSummary) {
this.logFinalErrors(this.failures);
Expand Down

0 comments on commit a8f1273

Please sign in to comment.