Skip to content

Commit

Permalink
doc: fix doc for correct usage with plan & TextContext
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.
  • Loading branch information
Emiltayeb committed Jun 27, 2024
1 parent ad6d00e commit bba6285
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 bba6285

Please sign in to comment.