Update enzyme config files

old
rubenmoya 2018-02-20 21:00:20 +01:00
parent 7e4c12efff
commit d313e11a1f
2 changed files with 10 additions and 1 deletions

3
jest.polyfills.js Normal file
View File

@ -0,0 +1,3 @@
global.requestAnimationFrame = function (callback) {
setTimeout(callback, 0);
};

View File

@ -1 +1,7 @@
Object.defineProperty(window, 'requestAnimationFrame', { value: fn => fn() });
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({
adapter: new Adapter(),
disableLifecycleMethods: true,
});