From: cjihrig Date: Mon, 22 Feb 2016 17:26:32 +0000 (-0500) Subject: doc: mention prototype check in deepStrictEqual() X-Git-Tag: v4.4.0~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc3f5fad6d706eb067f8a534c555049dfde482c0;p=platform%2Fupstream%2Fnodejs.git doc: mention prototype check in deepStrictEqual() The docs for assert.deepStrictEqual() do not currently mention that prototypes are compared for objects. This commit adds that information to the documentation. Fixes: https://github.com/nodejs/node/issues/5365 PR-URL: https://github.com/nodejs/node/pull/5367 Reviewed-By: Robert Lindstädt Reviewed-By: Benjamin Gruenbaum Reviewed-By: Sakthipriyan Vairamani --- diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index f0bc4fb..6bbbf6b 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -89,8 +89,9 @@ parameter is undefined, a default error message is assigned. ## assert.deepStrictEqual(actual, expected[, message]) -Generally identical to [`assert.deepEqual()`][] with the exception that primitive -values are compared using the strict equality operator ( `===` ). +Generally identical to `assert.deepEqual()` with two exceptions. First, +primitive values are compared using the strict equality operator ( `===` ). +Second, object comparisons include a strict equality check of their prototypes. ```js const assert = require('assert');