Skip to content

Commit

Permalink
fix(doc): copyedit test.md
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#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>
(cherry picked from commit a8bc202d855cc7d14895db38a2ac09d1f873e803)
(cherry picked from commit 5270582)
  • Loading branch information
aduh95 authored and MoLow committed Jul 31, 2022
1 parent 05c69cb commit 4022b1b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,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 @@ -179,7 +179,7 @@ describe('A thing', () => {
});
```

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

```mjs
import { describe, it } from 'test';
Expand Down Expand Up @@ -392,7 +392,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 @@ -403,7 +403,7 @@ The `describe()` function imported from the `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 @@ -448,7 +448,7 @@ same as [`it([name], { todo: true }[, fn])`][it options].
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 All @@ -472,7 +472,7 @@ describe('tests', async () => {
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 All @@ -496,7 +496,7 @@ describe('tests', async () => {
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 All @@ -521,7 +521,7 @@ describe('tests', async () => {
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 @@ -552,7 +552,7 @@ exposed as part of the API.
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 @@ -580,7 +580,7 @@ test('top level test', async (t) => {
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 @@ -610,7 +610,7 @@ not return a value.

`context.name`

The name of the test
The name of the test.

### `context.runOnly(shouldRunOnlyTests)`

Expand Down Expand Up @@ -688,7 +688,7 @@ exposed as part of the API.

### `context.name`

The name of the suite
The name of the suite.

### `context.signal`

Expand Down

0 comments on commit 4022b1b

Please sign in to comment.