Skip to content

Commit

Permalink
test: Remove inconsistent test
Browse files Browse the repository at this point in the history
  • Loading branch information
okonet committed Mar 7, 2017
1 parent df973d8 commit 8803097
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,6 @@ describe('react-container-dimensions', () => {
ContainerDimensions.prototype.onResize.restore()
})

it('calls onResize when parent has been resized', (done) => {
spy(ContainerDimensions.prototype, 'onResize')
const wrapper = mount(
<div ref="node" id="node" style={{ width: 10 }}>
<ContainerDimensions>
<MyComponent />
</ContainerDimensions>
</div>
, { attachTo: document.body })
const el = wrapper.render()
el.css('width', 10)
setTimeout(() => {
el.css('width', 100) // Triggering onResize event
expect(ContainerDimensions.prototype.onResize.calledTwice).to.be.true
ContainerDimensions.prototype.onResize.restore()
done()
}, 10)
})

it('onResize sets state with all keys and values from getBoundingClientRect', () => {
const styles = { top: 100, width: 200 }
stub(ContainerDimensions, 'getDomNodeDimensions', () => ({
Expand Down Expand Up @@ -149,7 +130,7 @@ describe('react-container-dimensions', () => {
const wrapper = mount(
<ContainerDimensions>
{
({ left, width, height }) => // eslint-disable-line
({ left, width, height }) => // eslint-disable-line react/prop-types
<MyComponent
left={left + 10}
width={width + 10}
Expand Down

0 comments on commit 8803097

Please sign in to comment.