Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ea9a19

Browse files
manekinekkoaduh95
andauthored
Update doc/api/test.md
Co-authored-by: Antoine du Hamel <[email protected]>
1 parent 1e28dfd commit 0ea9a19

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/api/test.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,14 @@ This function is used to create subtests under the current test. This function
459459
behaves in the same fashion as the top level [`test()`][] function.
460460

461461
```js
462-
test('top level test', (t) => {
463-
t.test('This is a subtest', { only: false, skip: false, concurrency: 1, todo: false }, (t) => {
464-
assert.equal(1, 1);
465-
});
462+
test('top level test', async (t) => {
463+
await t.test(
464+
'This is a subtest',
465+
{ only: false, skip: false, concurrency: 1, todo: false },
466+
(t) => {
467+
assert.ok('some relevant assertion here');
468+
}
469+
);
466470
});
467471
```
468472

0 commit comments

Comments
 (0)