diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-03-12 22:14:24 +0100 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-04-14 10:43:43 -0700 |
commit | bfe54df81240151a3aeaf99dcd91c362bab3a6b0 (patch) | |
tree | 2a78d0195295c23e21ae181eaf70174bd731c3d1 /test/message | |
parent | f2d112c6b7e81263de7ff911fa189a336d863892 (diff) | |
download | android-node-v8-bfe54df81240151a3aeaf99dcd91c362bab3a6b0.tar.gz android-node-v8-bfe54df81240151a3aeaf99dcd91c362bab3a6b0.tar.bz2 android-node-v8-bfe54df81240151a3aeaf99dcd91c362bab3a6b0.zip |
assert: improve default error messages
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>
Diffstat (limited to 'test/message')
-rw-r--r-- | test/message/assert_throws_stack.out | 2 | ||||
-rw-r--r-- | test/message/error_exit.out | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/message/assert_throws_stack.out b/test/message/assert_throws_stack.out index 71d06a461e..62a25a6367 100644 --- a/test/message/assert_throws_stack.out +++ b/test/message/assert_throws_stack.out @@ -2,7 +2,7 @@ assert.js:* throw new AssertionError(obj); ^ -AssertionError [ERR_ASSERTION]: Input A expected to deepStrictEqual input B: +AssertionError [ERR_ASSERTION]: Input A expected to strictly deep-equal input B: + expected - actual - Comparison {} diff --git a/test/message/error_exit.out b/test/message/error_exit.out index e7bcb05065..1935c18979 100644 --- a/test/message/error_exit.out +++ b/test/message/error_exit.out @@ -3,7 +3,11 @@ assert.js:* throw new AssertionError(obj); ^ -AssertionError [ERR_ASSERTION]: 1 strictEqual 2 +AssertionError [ERR_ASSERTION]: Input A expected to strictly equal input B: ++ expected - actual + +- 1 ++ 2 at Object.<anonymous> (*test*message*error_exit.js:*:*) at Module._compile (internal/modules/cjs/loader.js:*:*) at Object.Module._extensions..js (internal/modules/cjs/loader.js:*:*) |