Skip to content

Commit 7e43982

Browse files
authored
doc: improve TestContext hook descriptions
Signed-off-by: Rawal27 <obviouslykamal@gmail.com> PR-URL: #64899 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent d2e4682 commit 7e43982

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
@@ -4103,8 +4103,8 @@ added:
41034103
If unspecified, subtests inherit this value from their parent.
41044104
**Default:** `Infinity`.
41054105

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)