Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-06-17 01:46:59 +0300
committerRich Trott <rtrott@gmail.com>2019-06-19 02:18:25 +0300
commit17a5eba6c271c5faa89bd8a6434cad150aeeb98e (patch)
tree40870b0d56968fb19834cfd2192fd42d467413e2 /doc/api/assert.md
parente3d5257ec3dbb7b21ed2b972d6e6000ffe71084d (diff)
doc: tidy AssertionError text
Several minor improvements to text. Remove some repetition. PR-URL: https://github.com/nodejs/node/pull/28255 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/assert.md')
-rw-r--r--doc/api/assert.md31
1 files changed, 12 insertions, 19 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md
index b981b9497bb..c6e3302166a 100644
--- a/doc/api/assert.md
+++ b/doc/api/assert.md
@@ -21,33 +21,26 @@ thrown by the `assert` module will be instances of the `AssertionError` class.
added: v0.1.21
-->
* `options` {Object}
- * `message` {string} If provided, the error message is going to be set to this
- value.
- * `actual` {any} The `actual` property on the error instance is going to
- contain this value. Internally used for the `actual` error input in case
- e.g., [`assert.strictEqual()`] is used.
- * `expected` {any} The `expected` property on the error instance is going to
- contain this value. Internally used for the `expected` error input in case
- e.g., [`assert.strictEqual()`] is used.
- * `operator` {string} The `operator` property on the error instance is going
- to contain this value. Internally used to indicate what operation was used
- for comparison (or what assertion function triggered the error).
- * `stackStartFn` {Function} If provided, the generated stack trace is going to
- remove all frames up to the provided function.
+ * `message` {string} If provided, the error message is set to this value.
+ * `actual` {any} The `actual` property on the error instance.
+ * `expected` {any} The `expected` property on the error instance.
+ * `operator` {string} The `operator` property on the error instance.
+ * `stackStartFn` {Function} If provided, the generated stack trace omits
+ frames before this function.
A subclass of `Error` that indicates the failure of an assertion.
All instances contain the built-in `Error` properties (`message` and `name`)
and:
-* `actual` {any} Set to the actual value in case e.g.,
- [`assert.strictEqual()`] is used.
-* `expected` {any} Set to the expected value in case e.g.,
- [`assert.strictEqual()`] is used.
+* `actual` {any} Set to the `actual` argument for methods such as
+ [`assert.strictEqual()`].
+* `expected` {any} Set to the `expected` value for methods such as
+ [`assert.strictEqual()`].
* `generatedMessage` {boolean} Indicates if the message was auto-generated
(`true`) or not.
-* `code` {string} This is always set to the string `ERR_ASSERTION` to indicate
- that the error is actually an assertion error.
+* `code` {string} Value is always `ERR_ASSERTION` to show that the error is an
+ assertion error.
* `operator` {string} Set to the passed in operator value.
```js