| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -286,11 +286,7 @@ it('should do the thing', { expectFailure: 'feature not implemented' }, () => { | |||
| 286 | 286 | }); | |
| 287 | 287 | ``` | |
| 288 | 288 | ||
| 289 | - If the value of `expectFailure` is a | ||
| 290 | - [<RegExp>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) | | ||
| 291 | - [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) | | ||
| 292 | - [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) | | ||
| 293 | - [<Error>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error), | ||
| 289 | + If the value of `expectFailure` is a {RegExp|Function|Object|Error} | ||
| 294 | 290 | the tests will pass only if they throw a matching value. | |
| 295 | 291 | See [`assert.throws`][] for how each value type is handled. | |
| 296 | 292 | ||
@@ -1731,11 +1727,7 @@ changes: | |||
| 1731 | 1727 | **Default:** `false`. | |
| 1732 | 1728 | * `expectFailure` {boolean|string|RegExp|Function|Object|Error} If truthy, the | |
| 1733 | 1729 | test is expected to fail. If a non-empty string is provided, that string is displayed | |
| 1734 | - in the test results as the reason why the test is expected to fail. If a | ||
| 1735 | - [<RegExp>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp), | ||
| 1736 | - [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function), | ||
| 1737 | - [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object), or | ||
| 1738 | - [<Error>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | ||
| 1730 | + in the test results as the reason why the test is expected to fail. If a {RegExp|Function|Object|Error} | ||
| 1739 | 1731 | is provided directly (without wrapping in `{ match: … }`), the test passes | |
| 1740 | 1732 | only if the thrown error matches, following the behavior of | |
| 1741 | 1733 | [`assert.throws`][]. To provide both a reason and validation, pass an object | |
| Back | FazBrowse Home | New Git URL |
0 commit comments