Skip to content

Commit 0076c38

Browse files
authored
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: #44603 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent aa3d3b7 commit 0076c38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/test.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ same as [`it([name], { skip: true }[, fn])`][it options].
484484
Shorthand for marking a test as `TODO`,
485485
same as [`it([name], { todo: true }[, fn])`][it options].
486486

487-
### `before([, fn][, options])`
487+
## `before([, fn][, options])`
488488

489489
<!-- YAML
490490
added: v18.8.0
@@ -512,7 +512,7 @@ describe('tests', async () => {
512512
});
513513
```
514514

515-
### `after([, fn][, options])`
515+
## `after([, fn][, options])`
516516

517517
<!-- YAML
518518
added: v18.8.0
@@ -540,7 +540,7 @@ describe('tests', async () => {
540540
});
541541
```
542542

543-
### `beforeEach([, fn][, options])`
543+
## `beforeEach([, fn][, options])`
544544

545545
<!-- YAML
546546
added: v18.8.0
@@ -569,7 +569,7 @@ describe('tests', async () => {
569569
});
570570
```
571571

572-
### `afterEach([, fn][, options])`
572+
## `afterEach([, fn][, options])`
573573

574574
<!-- YAML
575575
added: v18.8.0

0 commit comments

Comments
 (0)