Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b962a7

Browse filesBrowse files
pmarchinitargos
authored andcommitted
test_runner: replace ansi clear with ansi reset
PR-URL: #55013 Fixes: #55009 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 1e53c10 commit 4b962a7
Copy full SHA for 4b962a7

File tree

Expand file treeCollapse file tree

3 files changed

+7
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-5
lines changed
Open diff view settings
Collapse file

‎lib/internal/test_runner/reporter/dot.js‎

Copy file name to clipboardExpand all lines: lib/internal/test_runner/reporter/dot.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ module.exports = async function* dot(source) {
1212
const failedTests = [];
1313
for await (const { type, data } of source) {
1414
if (type === 'test:pass') {
15-
yield `${colors.green}.${colors.clear}`;
15+
yield `${colors.green}.${colors.reset}`;
1616
}
1717
if (type === 'test:fail') {
18-
yield `${colors.red}X${colors.clear}`;
18+
yield `${colors.red}X${colors.reset}`;
1919
ArrayPrototypePush(failedTests, data);
2020
}
2121
if ((type === 'test:fail' || type === 'test:pass') && ++count === columns) {
Collapse file

‎lib/internal/util/colors.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/colors.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
red: '',
1414
gray: '',
1515
clear: '',
16+
reset: '',
1617
hasColors: false,
1718
shouldColorize(stream) {
1819
if (process.env.FORCE_COLOR !== undefined) {
@@ -32,6 +33,7 @@ module.exports = {
3233
module.exports.red = hasColors ? '\u001b[31m' : '';
3334
module.exports.gray = hasColors ? '\u001b[90m' : '';
3435
module.exports.clear = hasColors ? '\u001bc' : '';
36+
module.exports.reset = hasColors ? '\u001b[0m' : '';
3537
module.exports.hasColors = hasColors;
3638
}
3739
},
Collapse file
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c
2-
[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c
3-
[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c[32m.c
1+
[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m
2+
[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m
3+
[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.