Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Mar 2, 2023
1 parent 95d8d57 commit fec80e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/internal/test_runner/harness.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const {
ArrayPrototypeForEach,
PromiseResolve,
SafeMap,
SafeWeakSet,
} = primordials;
Expand Down Expand Up @@ -188,13 +187,12 @@ async function startSubtest(subtest) {
}

function runInParentContext(Factory, addShorthands = true) {
function run(name, options, fn, overrides) {
async function run(name, options, fn, overrides) {
const parent = testResources.get(executionAsyncId()) || getGlobalRoot();
const subtest = parent.createSubtest(Factory, name, options, fn, overrides);
if (!(parent instanceof Suite)) {
return startSubtest(subtest);
}
return PromiseResolve();
}

const test = (name, options, fn) => run(name, options, fn);
Expand Down

0 comments on commit fec80e6

Please sign in to comment.