GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: fix markdown for `expectFailure` values · windwiny/node@23ba205

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • test.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/test.md‎

Copy file name to clipboardExpand all lines: doc/api/test.md
+2-10Lines changed: 2 additions & 10 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -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}
295291
the tests will pass only if they throw a matching value.
296292
See [`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

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.