Skip to content

Commit

Permalink
update tests for react 16
Browse files Browse the repository at this point in the history
  • Loading branch information
lelandrichardson committed Sep 26, 2017
1 parent 664a99b commit 9930f3e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3475,7 +3475,7 @@ describe('shallow', () => {
},
);
wrapper.setState({ foo: 'baz' });
expect(spy.args).to.deep.equal([
const expected = [
[
'render',
],
Expand All @@ -3494,13 +3494,16 @@ describe('shallow', () => {
[
'render',
],
[
];
if (!REACT16) {
expected.push([
'componentDidUpdate',
{ foo: 'props' }, { foo: 'props' },
{ foo: 'bar' }, { foo: 'baz' },
REACT16 ? undefined : { foo: 'context' },
],
]);
{ foo: 'context' },
]);
}
expect(spy.args).to.deep.equal(expected);
});

it('should cancel rendering when Component returns false in shouldComponentUpdate', () => {
Expand Down

0 comments on commit 9930f3e

Please sign in to comment.