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