Skip to content

Commit

Permalink
test(app): update test dependencies to latest for best testing experi…
Browse files Browse the repository at this point in the history
…ence (#104)

Better testing experience and minor cleanup of latest spec timing commit
  • Loading branch information
tmcgee123 committed Nov 25, 2022
1 parent a8f1273 commit c62482a
Show file tree
Hide file tree
Showing 4 changed files with 625 additions and 210 deletions.
18 changes: 15 additions & 3 deletions index.js
Expand Up @@ -15,9 +15,19 @@ var SpecReporter = function (baseReporterDecorator, formatError, config) {
}, reporterCfg.prefixes);

this.failures = [];
this.USE_COLORS = false;
this.slowPokes = [];

this.USE_COLORS = false;
this.SPEC_FAILURE = '%s %s FAILED\n';
this.SPEC_SLOW = '%s SLOW %s: %s\n';
this.ERROR = '%s ERROR\n';
this.FINISHED_ERROR = ' ERROR';
this.FINISHED_SUCCESS = ' SUCCESS';
this.FINISHED_DISCONNECTED = ' DISCONNECTED';
this.X_FAILED = ' (%d FAILED)';
this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS\n';
this.TOTAL_FAILED = 'TOTAL: %d FAILED, %d SUCCESS\n';

// colorize output of BaseReporter functions
if (config.colors) {
colors.enabled = true;
Expand All @@ -41,7 +51,9 @@ 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() + ' - ') : '';
var currentTime = reporterCfg.showSpecTiming ?
(this.USE_COLORS ? (new Date().toLocaleString() + ' - ').yellow : (new Date().toLocaleString() + ' - ')) :
'';
if (!results.failed) {
if (!this.suppressSummary) {
this.write(currentTime + this.TOTAL_SUCCESS, results.success);
Expand Down Expand Up @@ -206,7 +218,7 @@ var SpecReporter = function (baseReporterDecorator, formatError, config) {
this.suppressErrorSummary = reporterCfg.suppressErrorSummary || false;
this.showSpecTiming = reporterCfg.showSpecTiming || false;
this.showBrowser = reporterCfg.showBrowser || false;
this.reportSlowerThan = config.reportSlowerThan || false;
this.reportSlowerThan = config.reportSlowerThan || reporterCfg.reportSlowerThan || false;
};

SpecReporter.$inject = ['baseReporterDecorator', 'formatError', 'config'];
Expand Down

0 comments on commit c62482a

Please sign in to comment.