Skip to content

Commit ae5981d

Browse files
committed
doc: improve TestContext hook descriptions
Signed-off-by: Rawal27 <obviouslykamal@gmail.com>
1 parent a6a1bd4 commit ae5981d

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

doc/api/test.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4104,8 +4104,8 @@ added:
41044104
If unspecified, subtests inherit this value from their parent.
41054105
**Default:** `Infinity`.
41064106

4107-
This function is used to create a hook running before
4108-
subtest of the current test.
4107+
This function registers a hook that runs before any subtests of the current
4108+
test.
41094109

41104110
### `context.beforeEach([fn][, options])`
41114111

@@ -4126,8 +4126,8 @@ added:
41264126
If unspecified, subtests inherit this value from their parent.
41274127
**Default:** `Infinity`.
41284128

4129-
This function is used to create a hook running
4130-
before each subtest of the current test.
4129+
This function registers a hook that runs before each subtest of the current
4130+
test.
41314131

41324132
```js
41334133
test('top level test', async (t) => {
@@ -4160,8 +4160,7 @@ added:
41604160
If unspecified, subtests inherit this value from their parent.
41614161
**Default:** `Infinity`.
41624162

4163-
This function is used to create a hook that runs after the current test
4164-
finishes.
4163+
This function registers a hook that runs after the current test finishes.
41654164

41664165
```js
41674166
test('top level test', async (t) => {
@@ -4189,8 +4188,8 @@ added:
41894188
If unspecified, subtests inherit this value from their parent.
41904189
**Default:** `Infinity`.
41914190

4192-
This function is used to create a hook running
4193-
after each subtest of the current test.
4191+
This function registers a hook that runs after each subtest of the current
4192+
test.
41944193

41954194
```js
41964195
test('top level test', async (t) => {

0 commit comments

Comments
 (0)