From 2e5fc8aa1aaf18bdee227dfc03380e9e60dd0cd5 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 6c2376ee8beeb5..2dc9ad967d3b6a 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -3423,9 +3423,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'); }, ); });