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 <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
Emiltayeb authored and aduh95 committed Jul 16, 2024
1 parent 6df86ae commit 2cf6096
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 @@ -3412,9 +3412,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 2cf6096

Please sign in to comment.