From 391690c9822c734c544ef78ee7e3e3edc789f0ea 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 58c39f1e69206e..7659416eaa0632 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -528,7 +528,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'); }); @@ -557,7 +557,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'); }); @@ -598,7 +598,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) => { @@ -630,7 +630,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) => {