Skip to content

Commit

Permalink
Fix wistia tests
Browse files Browse the repository at this point in the history
Oops…
  • Loading branch information
cookpete committed Jun 11, 2020
1 parent b92031a commit 85af252
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/players/Wistia.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class Wistia extends Component {

render () {
const { url } = this.props
const videoID = url.match(MATCH_URL_WISTIA)[1]
const videoID = url && url.match(MATCH_URL_WISTIA)[1]
const className = `wistia_embed wistia_async_${videoID}`
const style = {
width: '100%',
Expand Down
4 changes: 2 additions & 2 deletions test/players/Wistia.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ testPlayerMethods(Wistia, {
getCurrentTime: 'time',
getSecondsLoaded: null,
setPlaybackRate: 'playbackRate'
})
}, { config: TEST_CONFIG })

test('load()', t => {
const getSDK = sinon.stub(utils, 'getSDK').resolves()
Expand All @@ -59,7 +59,7 @@ test('load()', t => {
})

test('render()', t => {
const wrapper = shallow(<Wistia url={TEST_URL} />)
const wrapper = shallow(<Wistia url={TEST_URL} config={TEST_CONFIG} />)
const style = { width: '100%', height: '100%' }
t.true(wrapper.contains(
<div
Expand Down

0 comments on commit 85af252

Please sign in to comment.