aboutsummaryrefslogtreecommitdiff
path: root/test/message/assert_throws_stack.out
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-03-20 01:49:29 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-03-25 03:10:15 +0200
commita1c96f8e07115d3b6ff1498e7e9f530d2e0f1b6b (patch)
tree41cdf64c8541ae06f0976d43670ca5bd086bf309 /test/message/assert_throws_stack.out
parent28e4e43e513ae90e8a4236dbae7f3442ab8dbb4f (diff)
downloadandroid-node-v8-a1c96f8e07115d3b6ff1498e7e9f530d2e0f1b6b.tar.gz
android-node-v8-a1c96f8e07115d3b6ff1498e7e9f530d2e0f1b6b.tar.bz2
android-node-v8-a1c96f8e07115d3b6ff1498e7e9f530d2e0f1b6b.zip
assert: improve assert.throws
This switches the assert.throws output to the one used in strict mode if a error object is used for comparison. From now on it will show the complete difference between two objects instead of only showing the first failing property. It also fixes detecting properties with a undefined value and fails in case the thrown error does not contain the value at all. PR-URL: https://github.com/nodejs/node/pull/19463 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/message/assert_throws_stack.out')
-rw-r--r--test/message/assert_throws_stack.out8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/message/assert_throws_stack.out b/test/message/assert_throws_stack.out
index d34bdd2479..71d06a461e 100644
--- a/test/message/assert_throws_stack.out
+++ b/test/message/assert_throws_stack.out
@@ -2,7 +2,13 @@ assert.js:*
throw new AssertionError(obj);
^
-AssertionError [ERR_ASSERTION]: bar: expected true, not undefined
+AssertionError [ERR_ASSERTION]: Input A expected to deepStrictEqual input B:
++ expected - actual
+
+- Comparison {}
++ Comparison {
++ bar: true
++ }
at Object.<anonymous> (*assert_throws_stack.js:*:*)
at *
at *