From bdebc5ca983efb3e436865234ef8d5cd187fd07f Mon Sep 17 00:00:00 2001 From: Pete Cook <pete@cookpete.com> Date: Mon, 25 Jan 2016 13:00:54 +0000 Subject: [PATCH] Remove redundant test helper function --- test/karma/ReactPlayer.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/karma/ReactPlayer.js b/test/karma/ReactPlayer.js index d67a7af7..153b9fc6 100644 --- a/test/karma/ReactPlayer.js +++ b/test/karma/ReactPlayer.js @@ -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) }) })