summaryrefslogtreecommitdiff
path: root/test/pseudo-tty/test-assert-colors.js
AgeCommit message (Collapse)Author
2018-09-27assert: switch `inputs` to `values`Ruben Bridgewater
The wording seems clearer when using `values` instead of `inputs`. PR-URL: https://github.com/nodejs/node/pull/23056 Refs: https://github.com/nodejs/node/issues/22763 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-08-04assert: multiple improvementsRuben Bridgewater
1) Switched + / - and red / green in diffs. It seems like that style is more natural to most people. 2) Short primitives do not use the diff anymore. Especially short numbers can be read well like 1 !== 2. Cases that can not be displayed like that (e.g., -0 and +0) use the regular diff output. 3) Improved error descriptions. It was not always clear what the messages stood for. That should now be resolved. 4) Added a position indicator for single lines in case a tty is used and the line is shorter than the visual columns. 5) Color detection is now done by checking stderr instead of stdout. PR-URL: https://github.com/nodejs/node/pull/21628 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-04-29assert: make skipping indicator blueRuben Bridgewater
If lines gets skipped, they are marked with three dots. This makes sure they are better visualized to distinguish them from everything else. PR-URL: https://github.com/nodejs/node/pull/20315 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-04-14assert: improve default error messagesRuben Bridgewater
This improves the error messages for: - assert.notDeepStrictEqual - assert.deepStrictEqual - assert.notStrictEqual - assert.strictEqual Those will now always use the same error message as used in the strict mode. PR-URL: https://github.com/nodejs/node/pull/19467 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-27assert: fix diff color outputRuben Bridgewater
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: https://github.com/nodejs/node/pull/19464 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>