doc: fix heading levels for test runner hooks

before/after/beforeEach/afterEach are exported directly from `node:test`
and should not be indented under `it.todo`.

PR-URL: https://github.com/nodejs/node/pull/44603
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Fabian Meyer
2022-09-12 21:37:41 +02:00
committed by GitHub
parent aa3d3b7630
commit 0076c38f76

View File

@@ -484,7 +484,7 @@ same as [`it([name], { skip: true }[, fn])`][it options].
Shorthand for marking a test as `TODO`,
same as [`it([name], { todo: true }[, fn])`][it options].
### `before([, fn][, options])`
## `before([, fn][, options])`
<!-- YAML
added: v18.8.0
@@ -512,7 +512,7 @@ describe('tests', async () => {
});
```
### `after([, fn][, options])`
## `after([, fn][, options])`
<!-- YAML
added: v18.8.0
@@ -540,7 +540,7 @@ describe('tests', async () => {
});
```
### `beforeEach([, fn][, options])`
## `beforeEach([, fn][, options])`
<!-- YAML
added: v18.8.0
@@ -569,7 +569,7 @@ describe('tests', async () => {
});
```
### `afterEach([, fn][, options])`
## `afterEach([, fn][, options])`
<!-- YAML
added: v18.8.0