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 committed Jun 29, 2024
1 parent d4a40fd commit 2e5fc8a
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 @@ -3423,9 +3423,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 2e5fc8a

Please sign in to comment.