Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
VideoInfoBox snapshot tests
import {VideoInfoBox} from '../VideoInfoBox';
import {shallow} from 'enzyme';
import React from 'react';
describe('VideoInfoBox', () => {
test('renders collapsed', () => {
const wrapper = shallow(<VideoInfoBox/>);
expect(wrapper).toMatchSnapshot();
});
test('renders expanded', () => {
const wrapper = shallow(<VideoInfoBox/>);
wrapper.setState({collapsed: false});
expect(wrapper).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.