-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The color output was broken at some point and that was not detected because it was not tested for properly so far. This makes sure the colors work again and it adds a regression test as well. PR-URL: #19464 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
- Loading branch information
Showing
4 changed files
with
74 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
require('../common'); | ||
const assert = require('assert').strict; | ||
|
||
try { | ||
// Activate colors even if the tty does not support colors. | ||
process.env.COLORTERM = '1'; | ||
assert.deepStrictEqual([1, 2], [2, 2]); | ||
} catch (err) { | ||
const expected = 'Input A expected to deepStrictEqual input B:\n' + | ||
'\u001b[32m+ expected\u001b[39m \u001b[31m- actual\u001b[39m\n\n' + | ||
' [\n' + | ||
'\u001b[31m-\u001b[39m 1,\n' + | ||
'\u001b[32m+\u001b[39m 2,\n' + | ||
' 2\n' + | ||
' ]'; | ||
assert.strictEqual(err.message, expected); | ||
} |
Empty file.