Skip to content

Commit

Permalink
Mock requestAnimationFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
cehsu committed Oct 3, 2018
1 parent 3f7a59c commit a806fc7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('<CropperController>', () => {
beforeEach(() => {
window.addEventListener = sinon.spy();
window.removeEventListener = sinon.spy();
jest.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => cb()); // HACK: https://github.com/facebook/jest/issues/5147#issuecomment-353274996
});
it('should render', () => {
const tree = shallow(<CropperController src="test" />);
Expand Down

0 comments on commit a806fc7

Please sign in to comment.