diff options
author | Florin-Daniel BÎLBÎE <fbilbie@bitdefender.com> | 2018-11-06 16:06:18 +0000 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-13 13:32:56 -0800 |
commit | a2c2c78e097c4e1036eb24abd620a52c709a9467 (patch) | |
tree | 97c71da80ad9f92d24f9a472581b9fa7c27943a0 /test/pseudo-tty | |
parent | 7cd08eb100e03dd9c87fd9b0646c0f8029080081 (diff) | |
download | node-new-a2c2c78e097c4e1036eb24abd620a52c709a9467.tar.gz |
test: assert diff no color
PR-URL: https://github.com/nodejs/node/pull/24181
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/pseudo-tty')
-rw-r--r-- | test/pseudo-tty/test-assert-no-color.js | 19 | ||||
-rw-r--r-- | test/pseudo-tty/test-assert-no-color.out | 0 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/pseudo-tty/test-assert-no-color.js b/test/pseudo-tty/test-assert-no-color.js new file mode 100644 index 0000000000..9412cdcc95 --- /dev/null +++ b/test/pseudo-tty/test-assert-no-color.js @@ -0,0 +1,19 @@ +'use strict'; +require('../common'); +const assert = require('assert').strict; + +process.env.NODE_DISABLE_COLORS = true; + +try { + assert.deepStrictEqual({}, { foo: 'bar' }); +} catch (error) { + const expected = + 'Expected values to be strictly deep-equal:\n' + + '+ actual - expected\n' + + '\n' + + '+ {}\n' + + '- {\n' + + '- foo: \'bar\'\n' + + '- }'; + assert.strictEqual(error.message, expected); +} diff --git a/test/pseudo-tty/test-assert-no-color.out b/test/pseudo-tty/test-assert-no-color.out new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/pseudo-tty/test-assert-no-color.out |