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 juanarbol committed Oct 11, 2022
1 parent 2084ad6 commit 53543c6
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 @@ -446,7 +446,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: REPLACEME
Expand Down Expand Up @@ -474,7 +474,7 @@ describe('tests', async () => {
});
```

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

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

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

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

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

<!-- YAML
added: REPLACEME
Expand Down

0 comments on commit 53543c6

Please sign in to comment.