Skip to content

Commit 8cc5556

Browse files
MoLowRafaelGSS
authored andcommitted
doc: fix typo in test runner code examples
PR-URL: #44351 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 11e9d6e commit 8cc5556

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
@@ -524,7 +524,7 @@ before each subtest of the current suite.
524524

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

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

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

625625
```js
626626
test('top level test', async (t) => {
627-
t.afterEach((t) => t.diagnostics(`finished running ${t.name}`));
627+
t.afterEach((t) => t.diagnostic(`finished running ${t.name}`));
628628
await t.test(
629629
'This is a subtest',
630630
(t) => {

0 commit comments

Comments
 (0)