Skip to content

Commit

Permalink
✅ update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanish committed Aug 7, 2020
1 parent 6eb737e commit 199e1e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('react-progressive-graceful-image', () => {
it('renders placeholder image on initial render', () => {
const render = jest.fn(src => <img src={src} alt="an image" />);
const wrapper = mountProgressiveImage(render);
expect(render.mock.calls[0][0]).toEqual(placeholder);
expect(render.mock.calls[0][0]).toEqual(src);
});
it('renders src image on second render', () => {
const render = jest.fn(src => <img src={src} alt="an image" />);
Expand All @@ -100,7 +100,7 @@ describe('react-progressive-graceful-image', () => {
it('sets loading to false after src image is loaded', () => {
const render = jest.fn(src => <img src={src} alt="an image" />);
const wrapper = mountProgressiveImage(render);
expect(render.mock.calls[0][1]).toEqual(true);
expect(render.mock.calls[0][1]).toEqual(false);
wrapper.instance().loadImage(src);
wrapper.instance().onLoad();
expect(render.mock.calls[1][1]).toEqual(false);
Expand Down

0 comments on commit 199e1e7

Please sign in to comment.