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.
Software Engineer at Uphold · Previously Software Engineer at MOXY.studio · Java/.NET Back-end and C/C++ Embedded Software Engineer at Fraunhofer Portugal AICOS
Location
Porto, Portugal
Education
M.Sc. in Electrotechnical and Computers Engineering
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.
Software Engineer at Uphold · Previously Software Engineer at MOXY.studio · Java/.NET Back-end and C/C++ Embedded Software Engineer at Fraunhofer Portugal AICOS
Location
Porto, Portugal
Education
M.Sc. in Electrotechnical and Computers Engineering
Yep, that's what I'd recommend. You could also use the
styleprop 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! 😄