Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(expect): properly handle custom asymmetric matcher regression #35149

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

agg23
Copy link
Contributor

@agg23 agg23 commented Mar 11, 2025

Fixes #35138. #34620 failed to take into consideration multiple asymmetric matchers running in a given expect expression, and was a bit aggressive in cleaning it up.

@agg23 agg23 requested a review from pavelfeldman March 11, 2025 18:30
return matcher.call(target, ...args);
if (!testInfo) {
const matcherResult = matcher.call(target, ...args);
clearMatcherCallContext();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there be an async asymmetric matcher? If there can be we are in trouble!

This comment has been minimized.

@agg23 agg23 force-pushed the asymmetric-matcher-bad-error-fix branch from f1d47bc to 5604645 Compare March 12, 2025 15:20
@agg23 agg23 merged commit a980750 into microsoft:main Mar 12, 2025
28 of 29 checks passed
Copy link
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › tests/library/headful.spec.ts:233:3 › should click in OOPIF @chromium-ubuntu-22.04-node20
⚠️ [firefox-library] › tests/library/inspector/cli-codegen-aria.spec.ts:76:7 › should update aria snapshot highlight @firefox-ubuntu-22.04-node18
⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18

38731 passed, 807 skipped
✔️✔️✔️

Merge workflow run.

agg23 added a commit to agg23/playwright that referenced this pull request Mar 12, 2025
agg23 added a commit that referenced this pull request Mar 12, 2025
…atcher regression (#35167)
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.

[Regression]: TypeError: Cannot read properties of undefined (reading 'expectInfo')
2 participants