ant-design/tests/setup.js

14 lines
295 B
JavaScript
Raw Normal View History

// fixed jsdom miss
if (typeof window !== 'undefined') {
const matchMediaPolyfill = function matchMediaPolyfill() {
return {
matches: false,
addListener() {
},
removeListener() {
},
};
};
window.matchMedia = window.matchMedia || matchMediaPolyfill;
}