From 2cf60964e6fb6f75248cff0dd91dbb19c6877a20 Mon Sep 17 00:00:00 2001 From: Emil Tayeb <49617556+Emiltayeb@users.noreply.github.com> Date: Sat, 29 Jun 2024 22:20:35 +0300 Subject: [PATCH] doc: fix doc for correct usage with plan & TestContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed section in the doc that describes a test that uses the ⁠plan feature in the test-runner. However, the test in this example fails. The fix use (Textcontext) and reduce the plan number to 1 since we have 1 assertion. PR-URL: https://github.com/nodejs/node/pull/53615 Reviewed-By: Chemi Atlow Reviewed-By: Moshe Atlow --- doc/api/test.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index a87979a1e3dd07..b8b815b8b34090 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -3412,9 +3412,9 @@ behaves in the same fashion as the top level [`test()`][] function. test('top level test', async (t) => { await t.test( 'This is a subtest', - { only: false, skip: false, concurrency: 1, todo: false, plan: 4 }, + { only: false, skip: false, concurrency: 1, todo: false, plan: 1 }, (t) => { - assert.ok('some relevant assertion here'); + t.assert.ok('some relevant assertion here'); }, ); });