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