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
[BUG] incorrect @playwright/test typings for toMatchSnapshot/toMatchInlineSnapshot/etc #7284
Comments
Closing since this is fixed now on the master branch. You can try it out today via |
Thanks for the quick resolution! @JoelEinbinder, I wanted to double check whether it was intended that the new typings of Lines 24 to 34 in 4c6deaa
edit: it looks like the "Visual comparisons" docs are mostly using the string-param form, so probably not intentional |
@dbjorge did you try the patch? I wasn't able to reproduce this locally. The |
@JoelEinbinder, I'm sorry, my mistake! I missed that there was a separate overload underneath the modified typing for the string-arg form. I agree, it seems fine as is. |
Context:
@playwright/test
version: 1.12.2Code Snippet
Describe the bug
The typings mismatch the actual implementation here - at minimum, the typings Playwright exports should match what's actually available.
But ideally, we'd prefer for the normal
jest
/expect
behavior oftoMatchSnapshot
andtoMatchInlineSnapshot
to work per the originalexpect
typings, in addition to Playwright exposing a way to do screenshot snapshots (rather than instead of it). If we were to use@playwright/test
in most of our projects, it would involve migrating an existing corpus of Jest tests that make use of value snapshots, not just screenshot snapshots, so it'd be inconvenient to have to set up an alternative for them.context: found while working on microsoft/axe-pipelines-samples#579
The text was updated successfully, but these errors were encountered: