No-op outside a DOM environment: this hangs the mock off window, which
does not exist under environment: 'node', and the unguarded assignment
threw TypeError: Cannot set properties of undefined. Anything that reads
matchMedia needs a document anyway, so those files carry a
@vitest-environment jsdom docblock and still get the mock.
Mock window.matchMedia
Used for HDR detection and color space queries
No-op outside a DOM environment: this hangs the mock off
window, which does not exist underenvironment: 'node', and the unguarded assignment threwTypeError: Cannot set properties of undefined. Anything that readsmatchMedianeeds a document anyway, so those files carry a@vitest-environment jsdomdocblock and still get the mock.