Skip to content

Commit

Permalink
add test for component prop
Browse files Browse the repository at this point in the history
  • Loading branch information
modosc committed Feb 2, 2018
1 parent 18b2b94 commit fe362b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/components.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ describe('components', () => {
const component = shallow(<MediaQueryWrapper />)
expect(component).to.have.type(MediaQuery)
})
it('defaults to div', () => {
const component = shallow(<MediaQueryWrapper />)
expect(component).to.have.prop('component').deep.equal('div')
})
it('supports other components', () => {
const component = shallow(<MediaQueryWrapper component="p" />)
expect(component).to.have.prop('component').deep.equal('p')
})

it('handles MediaQuery props', () => {
const component = shallow(<MediaQueryWrapper {...{ query }} />)
expect(component).to.have.prop('query').deep.equal(query)
Expand Down

0 comments on commit fe362b4

Please sign in to comment.