From ae5981d331bee91ccfd555a82e23d6d4f3d6347e Mon Sep 17 00:00:00 2001 From: Rawal27 Date: Sat, 1 Aug 2026 10:44:15 +0530 Subject: [PATCH] doc: improve TestContext hook descriptions Signed-off-by: Rawal27 --- 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 d48e0e1f074e..233d91e0dac2 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -4104,8 +4104,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])` @@ -4126,8 +4126,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) => { @@ -4160,8 +4160,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) => { @@ -4189,8 +4188,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) => {