diff --git a/packages/browser/src/tester/ajs-tester.ts b/packages/browser/src/tester/ajs-tester.ts index 522b75495..ea317feba 100644 --- a/packages/browser/src/tester/ajs-tester.ts +++ b/packages/browser/src/tester/ajs-tester.ts @@ -12,11 +12,13 @@ function makeStub(page: playwright.Page) { ...args: Parameters ): Promise { return await page.evaluate((innerArgs) => { - // @ts-ignore - return window.analytics - .register(...innerArgs) - .then((ctx) => ctx.toJSON()) - // @ts-ignore + return ( + // @ts-ignore + window.analytics + .register(...innerArgs) + // @ts-ignore + .then((ctx) => ctx.toJSON()) + ) }, args) }, async track(