mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 12:10:06 +08:00
206a327ade
1. run all same demo test on node as jsom 2. mock date 3. create a setup file for common settings 4. skip breadcrumb router demo test
14 lines
295 B
JavaScript
14 lines
295 B
JavaScript
// fixed jsdom miss
|
|
if (typeof window !== 'undefined') {
|
|
const matchMediaPolyfill = function matchMediaPolyfill() {
|
|
return {
|
|
matches: false,
|
|
addListener() {
|
|
},
|
|
removeListener() {
|
|
},
|
|
};
|
|
};
|
|
window.matchMedia = window.matchMedia || matchMediaPolyfill;
|
|
}
|