Skip to content

fix(agents): add missing parentheses in test-generator example - #42744

Open
Metin Kılagöz (avgon) wants to merge 1 commit into
microsoft:mainfrom
avgon:fix/agent-md-syntax
Open

Metin Kılagöz (avgon) wants to merge 1 commit into
microsoft:mainfrom
avgon:fix/agent-md-syntax

Conversation

@avgon

Copy link
Copy Markdown

Fixes the invalid TypeScript syntax in the agent example that causes AI agents to reproduce the error in generated test output.

Change

async { page } => -> async ({ page }) => in playwright-test-generator.agent.md

The destructured parameter needs parentheses. Without them, this is a syntax error that gets pattern-matched by agents and reproduced in every generated spec.

Fixes #42743

`async { page } =>` is a syntax error; the destructured parameter
needs parentheses: `async ({ page }) =>`.

This is the only concrete example of a generated spec in
playwright-test-generator.agent.md, so agents pattern-match
against it and reproduce the invalid syntax in their output.

Fixes microsoft#42743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: playwright-test-generator.agent.md contains invalid TypeScript in its example (sync { page } =>)

1 participant