Skip to content

Commit 06a6bd8

Browse files
Emiltayebmarco-ippolito
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 2dff63c commit 06a6bd8

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
@@ -3140,9 +3140,9 @@ behaves in the same fashion as the top level [`test()`][] function.
31403140
test('top level test', async (t) => {
31413141
await t.test(
31423142
'This is a subtest',
3143-
{ only: false, skip: false, concurrency: 1, todo: false, plan: 4 },
3143+
{ only: false, skip: false, concurrency: 1, todo: false, plan: 1 },
31443144
(t) => {
3145-
assert.ok('some relevant assertion here');
3145+
t.assert.ok('some relevant assertion here');
31463146
},
31473147
);
31483148
});

0 commit comments

Comments
 (0)