My name is Kent C. Dodds and I'm a Remix Co-Founder, JavaScript engineer, and teacher. I'm also active in the open source community. I like my family, JavaScript, and React.
My name is Kent C. Dodds and I'm a Remix Co-Founder, JavaScript engineer, and teacher. I'm also active in the open source community. I like my family, JavaScript, and React.
With JSDOM, you can't measure layout, but you can verify that the style/class name was applied and trust that in the browser's ability to lay it out properly based on that.
You could check the styles or classes being applied at least and trust that the CSS is doing it's thing.
Yep, that's what I'd recommend. You could also use the
style
prop and verify the node.style.width is correct.Thanks, will try!
Would that really work in this case, i.e., when width is not specified by a CSS class?
With JSDOM, you can't measure layout, but you can verify that the style/class name was applied and trust that in the browser's ability to lay it out properly based on that.
Got it! Thanks! 😄