Created
March 6, 2018 01:10
-
-
Save FermiDirak/3aff3c0ebeb29448fd3e3b03eac1e50f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { shallowToJson } from 'enzyme-to-json'; | |
import { CarouselImage } from './../../client/src/components/CarouselImage.jsx'; | |
describe('<CarouselImage/>', () => { | |
let component = shallow(<CarouselImage/>); | |
it('should render', () => { | |
expect(shallowToJson(component)).toMatchSnapshot(); | |
}); | |
it('should be hoverable', () => { | |
expect(component.state().hover).toEqual(false); | |
component.simulate('mouseOver'); | |
expect(component.state().hover).toEqual(true); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment