Created
February 26, 2017 17:29
-
-
Save codeaholicguy/b35b4406fd497453819a241a8ac97cd6 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 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