Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "fixup!: try awaiting subtests"
This reverts commit d5e777d.
  • Loading branch information
JakobJingleheimer committed Mar 15, 2026
commit db192c3d8cd3edb8e4476e6cbfcaa9802634e091
26 changes: 12 additions & 14 deletions test/parallel/test-runner-subtest-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@ test('subtest should return a promise', async (t) => {
});

test('t.test[variant]() should return a promise', async (t) => {
const xfail = t.test.expectFailure('expectFailure subtest', () => { throw new Error('This should pass'); });
const only = t.test.only('only subtest');
const skip = t.test.skip('skip subtest');
const todo = t.test.todo('todo subtest');

assert.ok(isPromise(xfail));
assert.ok(isPromise(only));
assert.ok(isPromise(skip));
assert.ok(isPromise(todo));

await xfail;
await only;
await skip;
await todo;
assert.ok(isPromise(
t.test.expectFailure('expectFailure subtest', () => { throw new Error('This should pass'); })
));
assert.ok(isPromise(
t.test.only('only subtest')
));
assert.ok(isPromise(
t.test.skip('skip subtest')
));
assert.ok(isPromise(
t.test.todo('todo subtest')
));
});

test('nested subtests should have test variants', async (t) => {
Expand Down