Skip to content

Commit 84d706c

Browse files
Kamal Rawaladuh95
authored andcommitted
assert: improve documentation wording
Signed-off-by: Rawal27 <obviouslykamal@gmail.com> PR-URL: #64953 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 6ae81be commit 84d706c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

doc/api/assert.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ const assert2 = new Assert({ skipPrototype: true });
294294
assert2.deepStrictEqual(foo, bar); // OK
295295
```
296296

297-
When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
297+
When destructured, methods lose access to the instance's `this` context and revert to the default assertion behavior
298298
(diff: 'simple', non-strict mode).
299299
To maintain custom options when using destructured methods, avoid
300300
destructuring and call methods directly on the instance.
@@ -710,8 +710,8 @@ are also recursively evaluated by the following rules.
710710
### Comparison details
711711

712712
* Primitive values are compared with the [`==` operator][],
713-
with the exception of {NaN}. It is treated as being identical in case
714-
both sides are {NaN}.
713+
except for {NaN}, which is treated as identical when both
714+
sides are {NaN}.
715715
* [Type tags][Object.prototype.toString()] of objects should be the same.
716716
* Only [enumerable "own" properties][] are considered.
717717
* Object constructors are compared when available.
@@ -1210,7 +1210,7 @@ error messages as expressive as possible.
12101210
If specified, `error` can be a [`Class`][], {RegExp} or a validation
12111211
function. See [`assert.throws()`][] for more details.
12121212

1213-
Besides the async nature to await the completion behaves identically to
1213+
Aside from asynchronously awaiting completion, it behaves identically to
12141214
[`assert.doesNotThrow()`][].
12151215

12161216
```mjs

0 commit comments

Comments
 (0)