mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
21 lines
325 B
Plaintext
21 lines
325 B
Plaintext
assert.js:*
|
|
throw new AssertionError(obj);
|
|
^
|
|
|
|
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 *
|
|
at *
|
|
at *
|
|
at *
|
|
at *
|
|
at *
|
|
at *
|