Skip to content

Commit

Permalink
doc: adds assert doc for strict mode with pointer to strict equality
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitchittora committed Nov 14, 2019
1 parent ed40123 commit ce1edd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ changes:

In `strict` mode, `assert` functions use the comparison in the corresponding
strict functions. For example, [`assert.deepEqual()`][] will behave like
[`assert.deepStrictEqual()`][].
[`assert.deepStrictEqual()`][]. This uses the [Strict Equality Comparison][]
from the ECMAScript spec and does not refer to JavaScript strict mode (`"use strict";`)
in any way.

In `strict` mode, error messages for objects display a diff. In legacy mode,
error messages for objects display the objects, often truncated.
Expand Down Expand Up @@ -1319,6 +1321,7 @@ second argument. This might lead to difficult-to-spot errors.
[`assert.throws()`]: #assert_assert_throws_fn_error_message
[`strict` mode]: #assert_strict_mode
[Abstract Equality Comparison]: https://tc39.github.io/ecma262/#sec-abstract-equality-comparison
[Strict Equality Comparison]: https://tc39.es/ecma262/#sec-strict-equality-comparison
[Object wrappers]: https://developer.mozilla.org/en-US/docs/Glossary/Primitive#Primitive_wrapper_objects_in_JavaScript
[Object.prototype.toString()]: https://tc39.github.io/ecma262/#sec-object.prototype.tostring
[SameValue Comparison]: https://tc39.github.io/ecma262/#sec-samevalue
Expand Down

0 comments on commit ce1edd3

Please sign in to comment.