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

14 Replies, 696 Views

Hey, I had the exact same issue with Headless UI jsdom. What worked for me was using `@testing-library/react` and `@testing-library/jest-dom` together.

Also, make sure you’re not over-mocking the DOM. Sometimes, keeping it simple is better. I found that mocking too much can break the interactions.

If you’re still stuck, check out the Headless UI GitHub issues page. There’s a ton of helpful threads there.

Messages In This Thread



Users browsing this thread: 1 Guest(s)