Skip to content

Commit 2cf6096

Browse files
Emiltayebaduh95
authored andcommitted
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 6df86ae commit 2cf6096

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
@@ -3412,9 +3412,9 @@ behaves in the same fashion as the top level [`test()`][] function.
34123412
test('top level test', async (t) => {
34133413
await t.test(
34143414
'This is a subtest',
3415-
{ only: false, skip: false, concurrency: 1, todo: false, plan: 4 },
3415+
{ only: false, skip: false, concurrency: 1, todo: false, plan: 1 },
34163416
(t) => {
3417-
assert.ok('some relevant assertion here');
3417+
t.assert.ok('some relevant assertion here');
34183418
},
34193419
);
34203420
});

0 commit comments

Comments
 (0)