Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
femioladeji committed Jun 28, 2020
1 parent 4b36c2e commit 431af65
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions __mocks__/resize-observer-polyfill.js
@@ -0,0 +1,12 @@
class ResizeObserver {
observe() {
// do nothing
}
unobserve() {
// do nothing
}
}

window.ResizeObserver = ResizeObserver;

export default ResizeObserver;
5 changes: 4 additions & 1 deletion test-utils.js
@@ -1,6 +1,9 @@
import React from 'react'
import { render } from '@testing-library/react';
import { Fade, Zoom, Slide } from './src/lib';
import 'resize-observer-polyfill';
import { Fade, Zoom, Slide } from './src';

jest.mock('resize-observer-polyfill');

export const images = [
'images/slide_5.jpg',
Expand Down

0 comments on commit 431af65

Please sign in to comment.