@@ -287,11 +287,7 @@ it('should do the thing', { expectFailure: 'feature not implemented' }, () => {
287287});
288288```
289289
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}
295291the tests will pass only if they throw a matching value.
296292See [ ` assert.throws ` ] [ ] for how each value type is handled.
297293
@@ -1734,11 +1730,7 @@ changes:
17341730 ** Default:** ` false ` .
17351731 * ` expectFailure ` {boolean|string|RegExp|Function|Object|Error} If truthy, the
17361732 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}
17421734 is provided directly (without wrapping in ` { match: … } ` ), the test passes
17431735 only if the thrown error matches, following the behavior of
17441736 [ ` assert.throws ` ] [ ] . To provide both a reason and validation, pass an object
0 commit comments