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) => {