Skip to content

Commit 2d78c75

Browse files
Rawal27aduh95
authored andcommitted
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 7944b61 commit 2d78c75

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
@@ -4097,8 +4097,8 @@ added:
40974097
If unspecified, subtests inherit this value from their parent.
40984098
**Default:** `Infinity`.
40994099

4100-
This function is used to create a hook running before
4101-
subtest of the current test.
4100+
This function registers a hook that runs before any subtests of the current
4101+
test.
41024102

41034103
### `context.beforeEach([fn][, options])`
41044104

@@ -4119,8 +4119,8 @@ added:
41194119
If unspecified, subtests inherit this value from their parent.
41204120
**Default:** `Infinity`.
41214121

4122-
This function is used to create a hook running
4123-
before each subtest of the current test.
4122+
This function registers a hook that runs before each subtest of the current
4123+
test.
41244124

41254125
```js
41264126
test('top level test', async (t) => {
@@ -4153,8 +4153,7 @@ added:
41534153
If unspecified, subtests inherit this value from their parent.
41544154
**Default:** `Infinity`.
41554155

4156-
This function is used to create a hook that runs after the current test
4157-
finishes.
4156+
This function registers a hook that runs after the current test finishes.
41584157

41594158
```js
41604159
test('top level test', async (t) => {
@@ -4182,8 +4181,8 @@ added:
41824181
If unspecified, subtests inherit this value from their parent.
41834182
**Default:** `Infinity`.
41844183

4185-
This function is used to create a hook running
4186-
after each subtest of the current test.
4184+
This function registers a hook that runs after each subtest of the current
4185+
test.
41874186

41884187
```js
41894188
test('top level test', async (t) => {

0 commit comments

Comments
 (0)