Skip to content

BUG: missing-playwright-await max call stack #389

@ShaMan123

Description

@ShaMan123

Reproduce

        const thisIsCausingTheBug = 'some text';
        const pageCover = page.getByText(thisIsCausingTheBug);
        // Lint fails
        // eslint-disable-next-line playwright/missing-playwright-await <= doesn't workaround the bug
        const expectation = expect(
          pageCover,
          "message"
        ).toBeVisible();
        await page.clock.runFor(60_000);
        // awaited here
        await expectation;

Error trace

ESLint: 8.57.1

RangeError: Maximum call stack size exceeded
Occurred while linting /e2e/tests/SignalR/index.test.ts:121
Rule: "playwright/missing-playwright-await"
    at SourceCode.getScope (/node_modules/eslint/lib/source-code/source-code.js:770:13)
    at checkValidity (/node_modules/eslint-plugin-playwright/dist/index.cjs:736:42)
    at checkValidity (/node_modules/eslint-plugin-playwright/dist/index.cjs:741:15)

Versions

[email protected]
@playwright/[email protected] => patched slightly but unrelated to this error

Workaround/Triage

-        const thisIsCausingTheBug = 'some text';
-        const pageCover = page.getByText(thisIsCausingTheBug);
+        const pageCover = page.getByText('some text');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions