react-slick: Enquire js errors out becuase matchMedia not present
My error is matchMedia not present, legacy browsers require a polyfill
I am running my tests with jest.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (3 by maintainers)
@fadeojo you should add below jest config in package.json and add test-setup.js file https://github.com/akiran/react-slick/blob/master/package.json#L74-L76
https://github.com/akiran/react-slick/blob/master/test-setup.js
@akiran Running into the same problem while building to static bundle using “react-static-webpack-plugin”. What can be done? While in dev everything works fine.
I found that stubbing it out was the solution because the browser is headless. This is where I found the answer. Thanks.