diff --git a/src/common/IsolatedWorld.ts b/src/common/IsolatedWorld.ts index 9a7de4bbc15..38a40843bcd 100644 --- a/src/common/IsolatedWorld.ts +++ b/src/common/IsolatedWorld.ts @@ -159,7 +159,6 @@ export class IsolatedWorld { this.#injectPuppeteerUtil(context); this.#ctxBindings.clear(); this.#context.resolve(context); - this.#taskManager.rerunAll(); } async #injectPuppeteerUtil(context: ExecutionContext): Promise { @@ -173,6 +172,7 @@ export class IsolatedWorld { })()` )) as JSHandle ); + this.#taskManager.rerunAll(); } catch (error: unknown) { debugError(error); }