Skip to content

Commit

Permalink
doc: fix doc for correct usage with plan & TestContext
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
Emiltayeb authored and marco-ippolito committed Aug 19, 2024
1 parent 5076f0d commit 43ac5a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3140,9 +3140,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');
},
);
});
Expand Down

0 comments on commit 43ac5a2

Please sign in to comment.