details
HTML element works differently in happy-dom compared to js-dom
#1534
Labels
bug
Something isn't working
Describe the bug
I was working on something that uses the details element and I noticed that testing with react-testing-library behaved differently between one project of ours and another.
I checked versions of vitest (and other vitest dependencies), testing-library and although the stack trace didn't give me any insights, I think I've narrowed it down to happy-dom.
The details element when closed, is supposed to have had the
open
attribute stripped from it, becauseopen=""
andopen="false"
is actually open.js-dom seems to work that way, but not happy-dom.
To Reproduce
Steps to reproduce the behavior:
js-dom
happy-dom
npm run test
Expected behavior
Screenshots
CleanShot.2024-09-11.at.08.57.57.mp4
Device:
For this we're seeing it on MacOS, but because I've submitted with CodeSandbox, I'll be also sharing the hardware of that machine (Linux)
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: