assert: improve documentation wording

Signed-off-by: Rawal27 <obviouslykamal@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64953
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Kamal Rawal authored and Antoine du Hamel committed 2026-08-27 14:00:35 +02:00
1 parent 6ae81be0a3
commit 84d706cb9b
1 file changed
+4 -4
+4 -4
View File
@@ -294,7 +294,7 @@ const assert2 = new Assert({ skipPrototype: true });
assert2.deepStrictEqual(foo, bar); // OK
```
When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
When destructured, methods lose access to the instance's `this` context and revert to the default assertion behavior
(diff: 'simple', non-strict mode).
To maintain custom options when using destructured methods, avoid
destructuring and call methods directly on the instance.
@@ -710,8 +710,8 @@ are also recursively evaluated by the following rules.
### Comparison details
* Primitive values are compared with the [`==` operator][],
with the exception of {NaN}. It is treated as being identical in case
both sides are {NaN}.
except for {NaN}, which is treated as identical when both
sides are {NaN}.
* [Type tags][Object.prototype.toString()] of objects should be the same.
* Only [enumerable "own" properties][] are considered.
* Object constructors are compared when available.
@@ -1210,7 +1210,7 @@ error messages as expressive as possible.
If specified, `error` can be a [`Class`][], {RegExp} or a validation
function. See [`assert.throws()`][] for more details.
Besides the async nature to await the completion behaves identically to
Aside from asynchronously awaiting completion, it behaves identically to
[`assert.doesNotThrow()`][].
```mjs