mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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: https://github.com/nodejs/node/pull/53615 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
1 parent
d4a40fd1f7
commit
2e5fc8aa1a
1 file changed
+2
-2
+2
-2
@@ -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');
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user