| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d949ead commit 168c127
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,33 +21,26 @@ thrown by the `assert` module will be instances of the `AssertionError` class. | |||
| 21 | 21 | added: v0.1.21 | |
| 22 | 22 | --> | |
| 23 | 23 | * `options` {Object} | |
| 24 | - * `message` {string} If provided, the error message is going to be set to this | ||
| 25 | - value. | ||
| 26 | - * `actual` {any} The `actual` property on the error instance is going to | ||
| 27 | - contain this value. Internally used for the `actual` error input in case | ||
| 28 | - e.g., [`assert.strictEqual()`] is used. | ||
| 29 | - * `expected` {any} The `expected` property on the error instance is going to | ||
| 30 | - contain this value. Internally used for the `expected` error input in case | ||
| 31 | - e.g., [`assert.strictEqual()`] is used. | ||
| 32 | - * `operator` {string} The `operator` property on the error instance is going | ||
| 33 | - to contain this value. Internally used to indicate what operation was used | ||
| 34 | - for comparison (or what assertion function triggered the error). | ||
| 35 | - * `stackStartFn` {Function} If provided, the generated stack trace is going to | ||
| 36 | - remove all frames up to the provided function. | ||
| 24 | + * `message` {string} If provided, the error message is set to this value. | ||
| 25 | + * `actual` {any} The `actual` property on the error instance. | ||
| 26 | + * `expected` {any} The `expected` property on the error instance. | ||
| 27 | + * `operator` {string} The `operator` property on the error instance. | ||
| 28 | + * `stackStartFn` {Function} If provided, the generated stack trace omits | ||
| 29 | + frames before this function. | ||
| 37 | 30 | ||
| 38 | 31 | A subclass of `Error` that indicates the failure of an assertion. | |
| 39 | 32 | ||
| 40 | 33 | All instances contain the built-in `Error` properties (`message` and `name`) | |
| 41 | 34 | and: | |
| 42 | 35 | ||
| 43 | - * `actual` {any} Set to the actual value in case e.g., | ||
| 44 | - [`assert.strictEqual()`] is used. | ||
| 45 | - * `expected` {any} Set to the expected value in case e.g., | ||
| 46 | - [`assert.strictEqual()`] is used. | ||
| 36 | + * `actual` {any} Set to the `actual` argument for methods such as | ||
| 37 | + [`assert.strictEqual()`]. | ||
| 38 | + * `expected` {any} Set to the `expected` value for methods such as | ||
| 39 | + [`assert.strictEqual()`]. | ||
| 47 | 40 | * `generatedMessage` {boolean} Indicates if the message was auto-generated | |
| 48 | 41 | (`true`) or not. | |
| 49 | - * `code` {string} This is always set to the string `ERR_ASSERTION` to indicate | ||
| 50 | - that the error is actually an assertion error. | ||
| 42 | + * `code` {string} Value is always `ERR_ASSERTION` to show that the error is an | ||
| 43 | + assertion error. | ||
| 51 | 44 | * `operator` {string} Set to the passed in operator value. | |
| 52 | 45 | ||
| 53 | 46 | ```js | |
| Back | FazBrowse Home | New Git URL |
0 commit comments