Skip to content

Commit 6ee570a

Browse files
committed
Re-add is-unicode-supported
1 parent 78f49eb commit 6ee570a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/utils.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var path = require("node:path");
1212
var util = require("node:util");
1313
var he = require("he");
1414
var pc = require("picocolors");
15+
var isUnicodeSupported = require("is-unicode-supported")();
1516

1617
const MOCHA_ID_PROP_NAME = "__mocha_id__";
1718

@@ -714,8 +715,8 @@ exports.isCI = () => {
714715
};
715716

716717
exports.logSymbols = {
717-
info: pc.blue("ℹ"),
718-
success: pc.green("✔"),
719-
warning: pc.yellow("⚠"),
720-
error: pc.red("✖"),
718+
info: pc.blue(isUnicodeSupported ? "ℹ" : "i"),
719+
success: pc.green(isUnicodeSupported ? "✔" : "√"),
720+
warning: pc.yellow(isUnicodeSupported ? "⚠" : "‼"),
721+
error: pc.red(isUnicodeSupported ? "✖" : "),
721722
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"glob": "^10.4.5",
108108
"he": "^1.2.0",
109109
"is-path-inside": "^3.0.3",
110+
"is-unicode-supported": "^0.1.0",
110111
"js-yaml": "^4.1.0",
111112
"minimatch": "^9.0.5",
112113
"ms": "^2.1.3",

0 commit comments

Comments
 (0)