From 10f55b0aaef6bd7a5d5bacd88ac37d1b31941eff Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 22 Feb 2016 12:26:32 -0500 Subject: [PATCH] doc: mention prototype check in deepStrictEqual() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- doc/api/assert.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index f0bc4fbd0a5e8e..6bbbf6bd629e22 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');