Skip to content

test: use snapshots to properly test version-select component #1185

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

Closed

Conversation

aryanshridhar
Copy link
Collaborator

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.537% when pulling a46e96f on aryanshridhar:Add-VersionSelectSnapshots into ea1a151 on electron:main.

@aryanshridhar aryanshridhar marked this pull request as ready for review October 10, 2022 12:19
@aryanshridhar
Copy link
Collaborator Author

cc @georgexu99 @dsanders11 :)

@georgexu99
Copy link
Contributor

The test looks good, but I'm thinking that we should put this test with the rest of the PR? @dsanders11

Also, perhaps this is a bit of an unfounded worry, but given the size of the other PR and its age, it may honestly be easier reapply the changes on top of main (with a careful cherry-pick or by hand), unless merging the new main changes don't pose a huge problem

Copy link
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

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

I would lean against replacing the existing assertion with a snapshot test.

IMO this change makes it harder to read what the exact assertion is and makes the test more brittle to any change in the component (easy to get false positives).

@dsanders11
Copy link
Member

@erickzhao makes a good point about this making the test more brittle. Let's find a different way to fix the test failure in #1160. Sorry about the churn, @aryanshridhar.

@aryanshridhar
Copy link
Collaborator Author

No worries :)
Closing in favor of point put up by @erickzhao.

@aryanshridhar aryanshridhar deleted the Add-VersionSelectSnapshots branch October 16, 2022 13:19
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.

5 participants