Skip to content

Commit

Permalink
Remove redundant test helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Jan 25, 2016
1 parent 9626ccb commit bdebc5c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/karma/ReactPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ describe('ReactPlayer', () => {
it('fires onError for file', done => testError(TEST_FILE_ERROR, done))

it('switches between media', function (done) {
const renderPlayer = (url, onPlay) => render(<ReactPlayer url={url} playing onPlay={onPlay} />, div)
const renderFilePlayer = () => renderPlayer(TEST_FILE_URL, done)
const renderVimeoPlayer = () => renderPlayer(TEST_VIMEO_URL, renderFilePlayer)
const renderSoundCloudPlayer = () => renderPlayer(TEST_SOUNDCLOUD_URL, renderVimeoPlayer)
renderPlayer(TEST_YOUTUBE_URL, renderSoundCloudPlayer)
const renderFilePlayer = () => testPlay(TEST_FILE_URL, done)
const renderVimeoPlayer = () => testPlay(TEST_VIMEO_URL, renderFilePlayer)
const renderSoundCloudPlayer = () => testPlay(TEST_SOUNDCLOUD_URL, renderVimeoPlayer)
testPlay(TEST_YOUTUBE_URL, renderSoundCloudPlayer)
})
})

0 comments on commit bdebc5c

Please sign in to comment.