Browse Source

Update enzyme config files

old
rubenmoya 5 years ago
parent
commit
d313e11a1f
  1. 3
      jest.polyfills.js
  2. 8
      jest.setup.js

3
jest.polyfills.js

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

8
jest.setup.js

@ -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,
});

Loading…
Cancel
Save