summaryrefslogtreecommitdiff
path: root/doc/api/assert.md
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-06-19 22:05:44 -0600
committerRich Trott <rtrott@gmail.com>2019-06-22 07:05:15 -0600
commitad2036fc1a7114bdb961d176fcabca4e0a7b92f5 (patch)
tree3df5d73ec7dc16ea88a032f97b0b856f47d985ad /doc/api/assert.md
parent6e66313eb57308ee3b2b7a528af4e2cc90ecde3e (diff)
downloadandroid-node-v8-ad2036fc1a7114bdb961d176fcabca4e0a7b92f5.tar.gz
android-node-v8-ad2036fc1a7114bdb961d176fcabca4e0a7b92f5.tar.bz2
android-node-v8-ad2036fc1a7114bdb961d176fcabca4e0a7b92f5.zip
doc: revise assert legacy mode text
Revise the text for the `assert` module's legacy mode to make it simpler and more scannable. PR-URL: https://github.com/nodejs/node/pull/28315 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/assert.md')
-rw-r--r--doc/api/assert.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md
index e611dfbe1b..822e05aa1c 100644
--- a/doc/api/assert.md
+++ b/doc/api/assert.md
@@ -121,18 +121,21 @@ Please note that this will also deactivate the colors in the REPL.
> Stability: 0 - Deprecated: Use strict mode instead.
-When accessing `assert` directly instead of using the `strict` property, the
-[Abstract Equality Comparison][] will be used for any function without "strict"
-in its name, such as [`assert.deepEqual()`][].
+Legacy mode uses the [Abstract Equality Comparison][] in:
-It can be accessed using:
+* [`assert.deepEqual()`][]
+* [`assert.equal()`][]
+* [`assert.notDeepEqual()`][]
+* [`assert.notEqual()`][]
+
+To use legacy mode:
```js
const assert = require('assert');
```
-It is recommended to use the [`strict` mode][] instead as the
-[Abstract Equality Comparison][] can often have surprising results. This is
+Whenever possible, use the [`strict` mode][] instead. Otherwise, the
+[Abstract Equality Comparison][] may cause surprising results. This is
especially true for [`assert.deepEqual()`][], where the comparison rules are
lax: