diff options
Diffstat (limited to 'doc/api/assert.md')
-rw-r--r-- | doc/api/assert.md | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md index 339351db8b..80b3019ad8 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -469,6 +469,11 @@ suppressFrame(); ## assert.ifError(value) <!-- YAML added: v0.1.97 +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/18247 + description: Instead of throwing the original error it is now wrapped into + a AssertionError that contains the full stack trace. --> * `value` {any} @@ -483,11 +488,11 @@ assert.ifError(null); assert.ifError(0); // OK assert.ifError(1); -// Throws 1 +// AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 1 assert.ifError('error'); -// Throws 'error' +// AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' assert.ifError(new Error()); -// Throws Error +// AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error ``` ## assert.notDeepEqual(actual, expected[, message]) |