Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created July 25, 2016 17:23
Show Gist options
  • Save codeaholicguy/5fac6f26e4b9f58cf83d1dc09deecb28 to your computer and use it in GitHub Desktop.
Save codeaholicguy/5fac6f26e4b9f58cf83d1dc09deecb28 to your computer and use it in GitHub Desktop.
import TrackList from './TrackList';
import {shallow} from 'enzyme';
describe('TrackList', () => {
it('shows two tracks', () => {
const props = {
tracks: [{ id: 1, title: 'foo' }, { id: 2, title: 'bar' }]
};
const element = shallow(<TrackList {...props} />);
expect(element.find('div > div')).to.have.length(2);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment