From 4022b1bf541de3b750f369c9c00b614416248d1e Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 31 Jul 2022 14:58:18 +0200 Subject: [PATCH] fix(doc): copyedit `test.md` PR-URL: https://github.com/nodejs/node/pull/44061 Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Feng Yu Reviewed-By: Benjamin Gruenbaum (cherry picked from commit a8bc202d855cc7d14895db38a2ac09d1f873e803) (cherry picked from commit 5270582864c043eb51447cba6146e707ca002b33) --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index cfe3261..854b293 100644 --- a/README.md +++ b/README.md @@ -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', () => { @@ -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'; @@ -392,7 +392,7 @@ thus prevent the scheduled cancellation. results. **Default:** The `name` property of `fn`, or `''` 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. @@ -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])` @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -610,7 +610,7 @@ not return a value. `context.name` -The name of the test +The name of the test. ### `context.runOnly(shouldRunOnlyTests)` @@ -688,7 +688,7 @@ exposed as part of the API. ### `context.name` -The name of the suite +The name of the suite. ### `context.signal`