Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Fix: reporters with chalk functions (fixes #2073)

Gyandeep Singhd8ffcfb0775a
diff --git a/lib/reporters/landing.js b/lib/reporters/landing.js
index b66b2000..d8be3843 100644
--- a/lib/reporters/landing.js
+++ b/lib/reporters/landing.js
@@ -6,6 +6,7 @@ var Base = require('./base');
var inherits = require('../utils').inherits;
var cursor = Base.cursor;
var color = Base.color;
+var chalk = require('chalk');
/**
* Expose `Landing`.
@@ -17,19 +18,19 @@ exports = module.exports = Landing;
* Airplane color.
*/
-Base.colors.plane = 0;
+Base.colors.plane = chalk.white;
/**
* Airplane crash color.
*/
-Base.colors['plane crash'] = 31;
+Base.colors['plane crash'] = chalk.red;
/**
* Runway color.
*/
-Base.colors.runway = 90;
+Base.colors.runway = chalk.gray;
/**
* Initialize a new `Landing` reporter.
diff --git a/lib/reporters/progress.js b/lib/reporters/progress.js
index 5349ca89..d5bb5b11 100644
--- a/lib/reporters/progress.js
+++ b/lib/reporters/progress.js
@@ -6,6 +6,7 @@ var Base = require('./base');
var inherits = require('../utils').inherits;
var color = Base.color;
var cursor = Base.cursor;
+var chalk = require('chalk');
/**
* Expose `Progress`.
@@ -17,7 +18,7 @@ exports = module.exports = Progress;
* General progress bar color.
*/
-Base.colors.progress = 90;
+Base.colors.progress = chalk.gray;
/**
* Initialize a new `Progress` bar test reporter.