-
Notifications
You must be signed in to change notification settings - Fork 10.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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(gatsby-plugin-image): add test for gatsby-plugin-image browser #28101
test(gatsby-plugin-image): add test for gatsby-plugin-image browser #28101
Conversation
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.
Since me and @mfrachet pulled up this code together and walked through the logic in gatsby-image.browser.tsx
and these tests side by side I'm inclined to say this looks good! I learned a thing or two about some testing utilities along the way too 馃檪
} | ||
|
||
beforeHydrationContent = document.createElement(`div`) | ||
beforeHydrationContent.innerHTML = ` |
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.
Woah, is this to replicate the SSR? Clever.
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.
Nice
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.
This is awesome. Great work, @mfrachet ! I've not tested hydration before. Really interesting to see how it's done, and I feel a lot more confident with this in.
Happy it increases confidence! Thanks for the kind words 馃槉 |
Description
Added some tests for gatsby-image.browser
I did what I had in mind, this was quite tough to tests 馃槄
Feel free to ask for more, I'm maybe missing some cases 馃槵