Skip to content

Conversation

@joanrieu
Copy link

Fixes an issue where a fixture named then with a function value would make the entire test parameters object be incorrectly treated as a Promise by async/await, causing unexpected behaviour of the test runner.

The fix changes the internal representation of test parameters (the resolved fixtures) from a plain object to a Map, which is converted to an object only when passed to the test function. This prevents the name and type of fixtures from having any impact on the test runner's behaviour.

Fixes #38828

@joanrieu joanrieu changed the title Fix handling of resolved fixtures which look like a Promise fix(fixtures): prevent a fixture named "then" from being awaited Jan 24, 2026
@joanrieu joanrieu force-pushed the fix-fixtures-thenable branch from 1024f81 to 97f42b1 Compare January 25, 2026 00:02
@joanrieu joanrieu force-pushed the fix-fixtures-thenable branch from 97f42b1 to 15c3498 Compare January 25, 2026 00:25
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]: A fixture named "then" breaks Playwright

1 participant