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: use precise terminology in test runner · nodejs/node@585cbb2

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
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ processed in one of three ways:
4444
1. A synchronous function that is considered failing if it throws an exception,
4545
and is considered passing otherwise.
4646
2. A function that returns a `Promise` that is considered failing if the
47-
`Promise` rejects, and is considered passing if the `Promise` resolves.
47+
`Promise` rejects, and is considered passing if the `Promise` fulfills.
4848
3. A function that receives a callback function. If the callback receives any
4949
truthy value as its first argument, the test is considered failing. If a
5050
falsy value is passed as the first argument to the callback, the test is
@@ -67,7 +67,7 @@ test('synchronous failing test', (t) => {
6767

6868
test('asynchronous passing test', async (t) => {
6969
// This test passes because the Promise returned by the async
70-
// function is not rejected.
70+
// function is settled and not rejected.
7171
assert.strictEqual(1, 1);
7272
});
7373

@@ -1001,7 +1001,7 @@ changes:
10011001
to this function is a [`TestContext`][] object. If the test uses callbacks,
10021002
the callback function is passed as the second argument. **Default:** A no-op
10031003
function.
1004-
* Returns: {Promise} Resolved with `undefined` once
1004+
* Returns: {Promise} Fulfilled with `undefined` once
10051005
the test completes, or immediately if the test runs within [`describe()`][].
10061006

10071007
The `test()` function is the value imported from the `test` module. Each
@@ -1011,8 +1011,8 @@ The `TestContext` object passed to the `fn` argument can be used to perform
10111011
actions related to the current test. Examples include skipping the test, adding
10121012
additional diagnostic information, or creating subtests.
10131013

1014-
`test()` returns a `Promise` that resolves once the test completes.
1015-
if `test()` is called within a `describe()` block, it resolve immediately.
1014+
`test()` returns a `Promise` that fulfills once the test completes.
1015+
if `test()` is called within a `describe()` block, it fulfills immediately.
10161016
The return value can usually be discarded for top level tests.
10171017
However, the return value from subtests should be used to prevent the parent
10181018
test from finishing first and cancelling the subtest
@@ -2508,7 +2508,7 @@ changes:
25082508
to this function is a [`TestContext`][] object. If the test uses callbacks,
25092509
the callback function is passed as the second argument. **Default:** A no-op
25102510
function.
2511-
* Returns: {Promise} Resolved with `undefined` once the test completes.
2511+
* Returns: {Promise} Fulfilled with `undefined` once the test completes.
25122512

25132513
This function is used to create subtests under the current test. This function
25142514
behaves in the same fashion as the top level [`test()`][] function.

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.