Skip to content

Wrong floatingStyles when used in jest + rtl environment #2627

Answered by atomiks
R-Oscar asked this question in Q&A
Discussion options

You must be logged in to vote

JSDOM can't render elements to measure in its virtual env, so measured sizes are always 0.

Therefore you can't assert the sizes or location of the elements inside such an env - this requires Playwright or similar e2e tests.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@R-Oscar
Comment options

Answer selected by R-Oscar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants