Has anyone successfully integrated Headless UI with jsdom for testing? Any tips or challenges?

14 Replies, 693 Views

Hey everyone,

Has anyone here managed to integrate Headless UI jsdom for testing? I’m trying to get it set up for a project, but running into some weird issues.

Like, the components render fine in the browser, but when I use jsdom, some of the interactions just don’t work as expected. Not sure if it’s a Headless UI jsdom thing or if I’m missing something obvious.

Also, any tips on mocking the DOM properly? I feel like I’m fighting with jsdom more than actually testing my components lol.

Would love to hear if anyone’s been through this and has some advice. Or if there’s a better approach altogether.

Cheers!

Messages In This Thread
Has anyone successfully integrated Headless UI with jsdom for testing? Any tips or challenges? - by - 27-12-2024, 08:50 PM



Users browsing this thread: 1 Guest(s)