You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
515 B
15 lines
515 B
import { jsdom } from 'jsdom';
|
|
import Enzyme from 'enzyme';
|
|
import Adapter from 'enzyme-adapter-react-15';
|
|
|
|
Enzyme.configure({ adapter: new Adapter() });
|
|
|
|
// fixed jsdom miss
|
|
const documentHTML = '<!doctype html><html><body><div id="root"></div></body></html>';
|
|
global.document = jsdom(documentHTML);
|
|
global.window = document.defaultView;
|
|
global.navigator = global.window.navigator;
|
|
|
|
global.requestAnimationFrame = global.requestAnimationFrame || function requestAnimationFrame(cb) {
|
|
return setTimeout(cb, 0);
|
|
};
|
|
|