From fec80e6715eaec24e0d640d80cba01cb1f9f9d29 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Thu, 2 Mar 2023 21:04:58 +0200 Subject: [PATCH] CR --- lib/internal/test_runner/harness.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/internal/test_runner/harness.js b/lib/internal/test_runner/harness.js index 6141d13b0a20f2..ce7716252e195e 100644 --- a/lib/internal/test_runner/harness.js +++ b/lib/internal/test_runner/harness.js @@ -1,7 +1,6 @@ 'use strict'; const { ArrayPrototypeForEach, - PromiseResolve, SafeMap, SafeWeakSet, } = primordials; @@ -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);