-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove unnecessary and flaky snapshot test from ResponsiveBlockControl #26372
Conversation
Size Change: 0 B Total Size: 1.21 MB ℹ️ View Unchanged
|
I'm 👍 with this change. I've experienced several rounds of this particular snapshot needing updating in the past. I've never worked with this particular component before. I'm curious to hear the thoughts from those who have. |
ed99142
to
f3436ad
Compare
@getdave Do you have any insight into this test? Do you think it's okay or bad to remove the snapshot given that we're already testing for a lot of the output explicitly in the same test? |
I looked around a bit and there appears to be an official solution for component snapshots with emotion: If the plan is to continue using emotion it's probably worth getting that set up and working well. |
I'd say you're ok to remove the snapshot. I'm no longer a fan of them anyway and feel they add little or no value here. Thanks for fixing. |
f3436ad
to
46e320b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems folks agree to remove this. I'll repeat the following as a desirable direction generally:
I looked around a bit and there appears to be an official solution for component snapshots with emotion:
jest-emotion
.If the plan is to continue using emotion it's probably worth getting that set up and working well.
@sirreal We already use gutenberg/test/unit/jest.config.js Line 38 in 90a70fd
@ItsJonQ Is there something similar to |
@saramarcondes Funny enough.. I haven't run into the same flakey issues in G2 as I have in Gutenberg. G2 also uses Emotion, Jest, and Snapshots 🤔 |
Description
See #26078 (comment) for the original discussion. This test does not appear to add value to the test suite, especially when we're already explicitly testing many parts of the rendered component.
Here's another example PR where this test fails for no good reason: #26369
Types of changes
Updating a test.
Checklist:
Blocks #26369