Mock matchMedia in your tests with a virtual device
BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause