Skip to content

Commit

Permalink
doc: fix heading levels for test runner hooks
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
meyfa authored and RafaelGSS committed Sep 26, 2022
1 parent 6c55734 commit 0370563
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,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
Expand Down Expand Up @@ -503,7 +503,7 @@ describe('tests', async () => {
});
```

### `after([, fn][, options])`
## `after([, fn][, options])`

<!-- YAML
added: v18.8.0
Expand Down Expand Up @@ -531,7 +531,7 @@ describe('tests', async () => {
});
```

### `beforeEach([, fn][, options])`
## `beforeEach([, fn][, options])`

<!-- YAML
added: v18.8.0
Expand Down Expand Up @@ -560,7 +560,7 @@ describe('tests', async () => {
});
```

### `afterEach([, fn][, options])`
## `afterEach([, fn][, options])`

<!-- YAML
added: v18.8.0
Expand Down

0 comments on commit 0370563

Please sign in to comment.