Closed dschinkel closed 6 years ago
just went with the usual for now, it resolves it, good enough to move on..the mock was working but I was referencing some other jsdom code I had elsewhere so didn't realize it.
window.matchMedia || (
window.matchMedia = function () {
return {
matches: false,
addListener() {},
removeListener() {},
};
});
We're using react-slick which is using your enquire somewhere in its implementation.
When we run our own mocha tests in our project that's using react-slick we get
Error: matchMedia not present, legacy browsers require a polyfill
. But why should our project care anything aboutenquire.js
?This is what I get when running our tests
I've tried adding this to my jsdom.js but no luck: