/** * Patches `toBeVisible()` to understand popover and dialog visibility. * * jest-dom's `toBeVisible()` does not know about the Popover API. In real * browsers the UA stylesheet hides `[popover]` with `display: none`, but * jsdom has no such stylesheet - so closed popovers incorrectly appear visible. * * Raw jest-dom results in jsdom: * * closed popover / child → true (WRONG - should be false) * open popover / child → true (correct) * closed dialog / child → false (correct - jsdom natively hides ) * open dialog / child → true (correct) * * We correct both false positives and false negatives: * 1. Delegate to the original first. * 2. If it says "visible" → check for closed top-layer hosts (false positive). * 3. If it says "not visible" → check for open top-layer hosts (false negative). * * Must load via `setupFilesAfterEnv` (after jest-dom registers its matchers). * Polyfills live in `./polyfill` (loaded via `setupFiles`). */ export {};