From 8cc5556f7681f94544eec4f41a3b6150101efd91 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Tue, 23 Aug 2022 11:21:10 +0300 Subject: [PATCH] doc: fix typo in test runner code examples PR-URL: https://github.com/nodejs/node/pull/44351 Reviewed-By: Jacob Smith Reviewed-By: Luigi Pinca --- doc/api/test.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 88ade1a97360a7..442c66c1bc6578 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -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'); }); @@ -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'); }); @@ -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) => { @@ -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) => {