Skip to content

Commit

Permalink
doc: fix typo in test runner code examples
Browse files Browse the repository at this point in the history
PR-URL: #44351
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
MoLow authored and RafaelGSS committed Sep 5, 2022
1 parent 11e9d6e commit 8cc5556
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 @@ -524,7 +524,7 @@ before each subtest of the current suite.

```js
describe('tests', async () => {
beforeEach(() => t.diagnostics('about to run a test'));
beforeEach(() => t.diagnostic('about to run a test'));
it('is a subtest', () => {
assert.ok('some relevant assertion here');
});
Expand Down Expand Up @@ -553,7 +553,7 @@ after each subtest of the current test.

```js
describe('tests', async () => {
afterEach(() => t.diagnostics('about to run a test'));
afterEach(() => t.diagnostic('about to run a test'));
it('is a subtest', () => {
assert.ok('some relevant assertion here');
});
Expand Down Expand Up @@ -592,7 +592,7 @@ before each subtest of the current test.

```js
test('top level test', async (t) => {
t.beforeEach((t) => t.diagnostics(`about to run ${t.name}`));
t.beforeEach((t) => t.diagnostic(`about to run ${t.name}`));
await t.test(
'This is a subtest',
(t) => {
Expand Down Expand Up @@ -624,7 +624,7 @@ after each subtest of the current test.

```js
test('top level test', async (t) => {
t.afterEach((t) => t.diagnostics(`finished running ${t.name}`));
t.afterEach((t) => t.diagnostic(`finished running ${t.name}`));
await t.test(
'This is a subtest',
(t) => {
Expand Down

0 comments on commit 8cc5556

Please sign in to comment.