mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
doc: improve TestContext hook descriptions
Signed-off-by: Rawal27 <obviouslykamal@gmail.com> PR-URL: https://github.com/nodejs/node/pull/64899 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
1 parent
d2e4682d56
commit
7e439828de
1 file changed
+7
-8
+7
-8
@@ -4103,8 +4103,8 @@ added:
|
||||
If unspecified, subtests inherit this value from their parent.
|
||||
**Default:** `Infinity`.
|
||||
|
||||
This function is used to create a hook running before
|
||||
subtest of the current test.
|
||||
This function registers a hook that runs before any subtests of the current
|
||||
test.
|
||||
|
||||
### `context.beforeEach([fn][, options])`
|
||||
|
||||
@@ -4125,8 +4125,8 @@ added:
|
||||
If unspecified, subtests inherit this value from their parent.
|
||||
**Default:** `Infinity`.
|
||||
|
||||
This function is used to create a hook running
|
||||
before each subtest of the current test.
|
||||
This function registers a hook that runs before each subtest of the current
|
||||
test.
|
||||
|
||||
```js
|
||||
test('top level test', async (t) => {
|
||||
@@ -4159,8 +4159,7 @@ added:
|
||||
If unspecified, subtests inherit this value from their parent.
|
||||
**Default:** `Infinity`.
|
||||
|
||||
This function is used to create a hook that runs after the current test
|
||||
finishes.
|
||||
This function registers a hook that runs after the current test finishes.
|
||||
|
||||
```js
|
||||
test('top level test', async (t) => {
|
||||
@@ -4188,8 +4187,8 @@ added:
|
||||
If unspecified, subtests inherit this value from their parent.
|
||||
**Default:** `Infinity`.
|
||||
|
||||
This function is used to create a hook running
|
||||
after each subtest of the current test.
|
||||
This function registers a hook that runs after each subtest of the current
|
||||
test.
|
||||
|
||||
```js
|
||||
test('top level test', async (t) => {
|
||||
|
||||
Reference in new issue
Block a user