From e71d09d5f13bc68018d99646b0daeafa03433711 Mon Sep 17 00:00:00 2001 From: Kamal Rawal Date: Mon, 3 Aug 2026 11:05:11 +0530 Subject: [PATCH] doc: improve TestContext hook descriptions Signed-off-by: Rawal27 PR-URL: https://github.com/nodejs/node/pull/64899 Reviewed-By: Aviv Keller Reviewed-By: Moshe Atlow --- doc/api/test.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 5fb7fb18308..ac35f0efd98 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -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) => {