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>
This commit is contained in:
Ruben Bridgewater authored and James M Snell committed 2018-04-16 16:13:41 -07:00
1 parent f848c60f64
commit eb427caadd
8 files changed
+320 -120

No files matched your search

+1 -1
View File
@@ -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 {}