diff --git a/doc/api/assert.md b/doc/api/assert.md index 504830826b7da4..fd8973efb9ac2d 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -101,7 +101,9 @@ assert.deepEqual(obj1, obj4); If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` -parameter is undefined, a default error message is assigned. +parameter is undefined, a default error message is assigned. If the `message` +parameter is an instance of an `Error` then it will be thrown instead of the +`AssertionError`. ## assert.deepStrictEqual(actual, expected[, message])