Skip to content

Commit

Permalink
fix test: shallow does not support callback for setProps
Browse files Browse the repository at this point in the history
  • Loading branch information
emuraton committed Jul 22, 2018
1 parent 6f21291 commit e9e6e58
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,8 @@ describe('shallow', () => {
expect(wrapper.find('.foo')).to.have.lengthOf(1);

wrapper[sym('__renderer__')].batchedUpdates(() => {
wrapper.setProps({ id: 'bar', foo: 'bla' }, () => {
expect(wrapper.find('.bar')).to.have.lengthOf(1);
});
expect(wrapper.find('.bar')).to.have.lengthOf(0);
wrapper.setProps({ id: 'bar', foo: 'bla' })
expect(wrapper.find('.bar')).to.have.lengthOf(1);
});
});

Expand Down

0 comments on commit e9e6e58

Please sign in to comment.