Skip to content

Commit

Permalink
Consume log-symbols alternate to code for win32 in reporters/base (#4389
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MoonSupport committed May 21, 2021
1 parent 641970d commit 7c3daea
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/reporters/base.js
Expand Up @@ -10,6 +10,7 @@ var diff = require('diff');
var milliseconds = require('ms');
var utils = require('../utils');
var supportsColor = require('supports-color');
var symbols = require('log-symbols');
var constants = require('../runner').constants;
var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
Expand Down Expand Up @@ -88,20 +89,13 @@ exports.colors = {
*/

exports.symbols = {
ok: '✓',
err: '✖',
dot: '',
ok: symbols.success,
err: symbols.err,
dot: '.',
comma: ',',
bang: '!'
};

// With node.js on Windows: use symbols available in terminal default fonts
if (process.platform === 'win32') {
exports.symbols.ok = '\u221A';
exports.symbols.err = '\u00D7';
exports.symbols.dot = '.';
}

/**
* Color `str` with the given `type`,
* allowing colors to be disabled,
Expand Down

0 comments on commit 7c3daea

Please sign in to comment.