Skip to content

Commit

Permalink
Nest media switching test in a describe block
Browse files Browse the repository at this point in the history
I don't know why this fixes the tests but it does..
  • Loading branch information
cookpete committed Jun 3, 2016
1 parent 3718730 commit 2fe8806
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/karma/ReactPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ describe('ReactPlayer', () => {
it.skip('fires onError', (done) => testError(TEST_FILE_ERROR, done))
})

it('switches between media', function (done) {
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)
describe('Switching', () => {
it('switches between media', function (done) {
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 2fe8806

Please sign in to comment.