Yo, I feel your pain. Headless UI jsdom can be a headache. One thing that helped me was mocking out the event handlers manually.
Like, instead of relying on jsdom to handle clicks or focus, I wrote custom mocks for those events. It’s a bit more work, but it gives you way more control.
Also, have you tried using `jest-dom`? It extends jest with some handy matchers for DOM testing. Might save you some time.
Like, instead of relying on jsdom to handle clicks or focus, I wrote custom mocks for those events. It’s a bit more work, but it gives you way more control.
Also, have you tried using `jest-dom`? It extends jest with some handy matchers for DOM testing. Might save you some time.
