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
Jsdom inconsistencies for 0px in matchInilneSnapshot #922
Comments
Thank you for reporting @belgattitude! 🙂 Happy DOM aims to work according to spec and behave like a browser as much as possible. Happy DOM behaves according to spec here while JSDOM doesn't. You can easily test it in dev tools in the browser: var element = document.createElement('div');
element.style.height = '0';
// Outputs: '<div style="height: 0px;"></div>'
console.log(element.outerHTML); |
I will close this issue as it is working as intended. |
Sorry @belgattitude. I think I was a bit to fast closing this one. Read the snapshot the other way around. I have re-opened it. |
Fantastic, thank you |
@belgattitude this has been fixed now. "height" was missed somehow as Happy DOM has support for "width". That is why I felt pretty sure that it was already covered 😆 You can read more about the release here: |
Thank you so much @capricorn86 ... I'll test this out soon. |
Describe the bug
While experimenting a move from jsdom to happy-dom, I stumbled on a different way to express style in jsdom/happy-dom.
To Reproduce
Don't know if it helps enough but you'll find info here: strapi/strapi#16713 (comment)
Example test: https://github.com/strapi/strapi/blob/main/packages/core/admin/admin/src/pages/NotFoundPage/tests/index.test.js#L27
Expected behavior
I'm not sure if it should be changed in happy-dom, but for users migrating from jsdom it can certainly help.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: