Skip to content

Commit

Permalink
doc: improve assert legacy text
Browse files Browse the repository at this point in the history
This changes a sentence fragment into a full sentence and provides a few
other minor improvements.

PR-URL: #19622
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Shingo Inoue <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Trott authored and targos committed Mar 27, 2018
1 parent 8191ada commit 3894981
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ 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 a
"strict" in its name (e.g. [`assert.deepEqual()`][]).
[Abstract Equality Comparison][] will be used for any function without "strict"
in its name, such as [`assert.deepEqual()`][].

It can be accessed using:

Expand All @@ -83,11 +83,9 @@ const assert = require('assert');
```

It is recommended to use the [`strict mode`][] instead as the
[Abstract Equality Comparison][] can often have surprising results. Especially
in case of [`assert.deepEqual()`][] as the used comparison rules there are very
lax.

E.g.
[Abstract Equality Comparison][] can often have surprising results. This is
especially true for [`assert.deepEqual()`][], where the comparison rules are
lax:

```js
// WARNING: This does not throw an AssertionError!
Expand Down

0 comments on commit 3894981

Please sign in to comment.