-
Notifications
You must be signed in to change notification settings - Fork 2.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
snapshots failing due to style prop differences #731
Comments
Heh that's indeed very weird... Also interesting to see that so many styles are different. Seems like I'll do some debugging on this! |
In the meantime I removed the use of the |
@kentcdodds @CompuIves exports[`renders a toggle component 1`] = `
<div>
<div>
<div
style="display: flex;"
>
<nav>
<ul
style="display: flex; list-style: none; padding-left: 0px;"
>
<li>
<a
href="index.html"
>
Home
</a>
</li>
[...] but if I run it locally, go to <div>
<div>
<div>
<div style="display: flex; justify-content: space-around; align-items: center;">
<nav style="flex: 1 1 0%;">
<ul style="display: flex; justify-content: space-around; list-style: none; padding-left: 0px;">
<li>
<a href="index.html">Home</a>
</li>
[...] Although, weirdly enough, running tests locally works. So it really looks like jest's snapshot renderer (or whoever's responsible for that) is stripping CSS attributes related to flexbox. |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed. |
Hi 👋
So these snapshots pass locally and in CI, but not in codesandbox. https://codesandbox.io/s/249l243k5j
All the differences are in the style prop:
I'm not sure why though... Seems like a bug.
The text was updated successfully, but these errors were encountered: