Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin-Daniel BÎLBÎE <fbilbie@bitdefender.com>2018-11-06 19:06:18 +0300
committerRich Trott <rtrott@gmail.com>2018-11-14 00:32:56 +0300
commita2c2c78e097c4e1036eb24abd620a52c709a9467 (patch)
tree97c71da80ad9f92d24f9a472581b9fa7c27943a0
parent7cd08eb100e03dd9c87fd9b0646c0f8029080081 (diff)
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>
-rw-r--r--test/pseudo-tty/test-assert-no-color.js19
-rw-r--r--test/pseudo-tty/test-assert-no-color.out0
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 00000000000..9412cdcc953
--- /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 00000000000..e69de29bb2d
--- /dev/null
+++ b/test/pseudo-tty/test-assert-no-color.out