Skip to content

Instantly share code, notes, and snippets.

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