Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created February 26, 2017 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/b35b4406fd497453819a241a8ac97cd6 to your computer and use it in GitHub Desktop.
Save codeaholicguy/b35b4406fd497453819a241a8ac97cd6 to your computer and use it in GitHub Desktop.
import TrackList from './TrackList';
import Track from './Track';
import {shallow} from 'enzyme';
describe('TrackList', () => {
it('shows two <Track /> component', () => {
const props = {
tracks: {
tracks: [{ origin: { id: 1, title: 'foo' }}, { origin: { id: 2, title: 'bar' }}],
activeTrack: null
}
};
const element = shallow(<TrackList {...props} />);
expect(element.find(Track)).to.have.length(2);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment