Skip to content

Commit

Permalink
doc: copyedit test.md
Browse files Browse the repository at this point in the history
PR-URL: #44061
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
aduh95 authored and juanarbol committed Oct 11, 2022
1 parent bfdee25 commit 1f9246a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Running tests can also be done using `describe` to declare a suite
and `it` to declare a test.
A suite is used to organize and group related tests together.
`it` is an alias for `test`, except there is no test context passed,
since nesting is done using suites, as demonstrated in this example
since nesting is done using suites.

```js
describe('A thing', () => {
Expand All @@ -174,7 +174,7 @@ describe('A thing', () => {
});
```

`describe` and `it` are imported from the `node:test` module
`describe` and `it` are imported from the `node:test` module.

```mjs
import { describe, it } from 'node:test';
Expand Down Expand Up @@ -398,7 +398,7 @@ thus prevent the scheduled cancellation.
results. **Default:** The `name` property of `fn`, or `'<anonymous>'` if `fn`
does not have a name.
* `options` {Object} Configuration options for the suite.
supports the same options as `test([name][, options][, fn])`
supports the same options as `test([name][, options][, fn])`.
* `fn` {Function|AsyncFunction} The function under suite
declaring all subtests and subsuites.
The first argument to this function is a [`SuiteContext`][] object.
Expand All @@ -409,7 +409,7 @@ The `describe()` function imported from the `node:test` module. Each
invocation of this function results in the creation of a Subtest
and a test point in the TAP output.
After invocation of top level `describe` functions,
all top level tests and suites will execute
all top level tests and suites will execute.

## `describe.skip([name][, options][, fn])`

Expand Down Expand Up @@ -458,7 +458,7 @@ added: REPLACEME
function.
* `options` {Object} Configuration options for the hook. The following
properties are supported:
* `signal` {AbortSignal} Allows aborting an in-progress hook
* `signal` {AbortSignal} Allows aborting an in-progress hook.
* `timeout` {number} A number of milliseconds the hook will fail after.
If unspecified, subtests inherit this value from their parent.
**Default:** `Infinity`.
Expand Down Expand Up @@ -486,7 +486,7 @@ added: REPLACEME
function.
* `options` {Object} Configuration options for the hook. The following
properties are supported:
* `signal` {AbortSignal} Allows aborting an in-progress hook
* `signal` {AbortSignal} Allows aborting an in-progress hook.
* `timeout` {number} A number of milliseconds the hook will fail after.
If unspecified, subtests inherit this value from their parent.
**Default:** `Infinity`.
Expand Down Expand Up @@ -514,7 +514,7 @@ added: REPLACEME
function.
* `options` {Object} Configuration options for the hook. The following
properties are supported:
* `signal` {AbortSignal} Allows aborting an in-progress hook
* `signal` {AbortSignal} Allows aborting an in-progress hook.
* `timeout` {number} A number of milliseconds the hook will fail after.
If unspecified, subtests inherit this value from their parent.
**Default:** `Infinity`.
Expand Down Expand Up @@ -543,7 +543,7 @@ added: REPLACEME
function.
* `options` {Object} Configuration options for the hook. The following
properties are supported:
* `signal` {AbortSignal} Allows aborting an in-progress hook
* `signal` {AbortSignal} Allows aborting an in-progress hook.
* `timeout` {number} A number of milliseconds the hook will fail after.
If unspecified, subtests inherit this value from their parent.
**Default:** `Infinity`.
Expand Down Expand Up @@ -582,7 +582,7 @@ added: REPLACEME
function.
* `options` {Object} Configuration options for the hook. The following
properties are supported:
* `signal` {AbortSignal} Allows aborting an in-progress hook
* `signal` {AbortSignal} Allows aborting an in-progress hook.
* `timeout` {number} A number of milliseconds the hook will fail after.
If unspecified, subtests inherit this value from their parent.
**Default:** `Infinity`.
Expand Down Expand Up @@ -614,7 +614,7 @@ added: REPLACEME
function.
* `options` {Object} Configuration options for the hook. The following
properties are supported:
* `signal` {AbortSignal} Allows aborting an in-progress hook
* `signal` {AbortSignal} Allows aborting an in-progress hook.
* `timeout` {number} A number of milliseconds the hook will fail after.
If unspecified, subtests inherit this value from their parent.
**Default:** `Infinity`.
Expand Down Expand Up @@ -658,7 +658,7 @@ test('top level test', (t) => {
added: REPLACEME
-->

The name of the test
The name of the test.

### `context.runOnly(shouldRunOnlyTests)`

Expand Down Expand Up @@ -809,7 +809,7 @@ exposed as part of the API.
added: REPLACEME
-->

The name of the suite
The name of the suite.

### `context.signal`

Expand Down

0 comments on commit 1f9246a

Please sign in to comment.