Skip to content

Commit 2e5fc8a

Browse files
authored
doc: fix doc for correct usage with plan & TestContext
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: #53615 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent d4a40fd commit 2e5fc8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/test.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3423,9 +3423,9 @@ behaves in the same fashion as the top level [`test()`][] function.
34233423
test('top level test', async (t) => {
34243424
await t.test(
34253425
'This is a subtest',
3426-
{ only: false, skip: false, concurrency: 1, todo: false, plan: 4 },
3426+
{ only: false, skip: false, concurrency: 1, todo: false, plan: 1 },
34273427
(t) => {
3428-
assert.ok('some relevant assertion here');
3428+
t.assert.ok('some relevant assertion here');
34293429
},
34303430
);
34313431
});

0 commit comments

Comments
 (0)