Skip to content

Commit

Permalink
fix(colors): Set colors.enabled = true when colors is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaegclark committed Dec 12, 2017
1 parent 0ba0bbc commit 51a677c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('colors');
var colors = require('colors');

var SpecReporter = function (baseReporterDecorator, formatError, config) {
baseReporterDecorator(this);
Expand All @@ -19,6 +19,7 @@ var SpecReporter = function (baseReporterDecorator, formatError, config) {

// colorize output of BaseReporter functions
if (config.colors) {
colors.enabled = true;
this.USE_COLORS = true;
this.SPEC_FAILURE = '%s %s FAILED'.red + '\n';
this.SPEC_SLOW = '%s SLOW %s: %s'.yellow + '\n';
Expand Down

0 comments on commit 51a677c

Please sign in to comment.