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:
Kamal Rawal authored and Antoine du Hamel committed 2026-08-05 11:15:08 +02:00
1 parent d5358a75bc
commit e71d09d5f1
1 file changed
+7 -8
+7 -8
View File
@@ -4097,8 +4097,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])`
@@ -4119,8 +4119,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) => {
@@ -4153,8 +4153,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) => {
@@ -4182,8 +4181,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) => {