Ugh, I feel you. Headless UI jsdom is such a pain sometimes. I spent hours debugging why my dropdowns weren’t working in tests.
Turns out, jsdom doesn’t handle focus management well at all. I ended up using `user-event` from `@testing-library/user-event` to simulate interactions. It’s way more reliable than trying to mock everything yourself.
Also, double-check your jest config. Sometimes the environment settings can mess things up.
Turns out, jsdom doesn’t handle focus management well at all. I ended up using `user-event` from `@testing-library/user-event` to simulate interactions. It’s way more reliable than trying to mock everything yourself.
Also, double-check your jest config. Sometimes the environment settings can mess things up.
