Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yenshih committed Jan 6, 2018
1 parent 32d1907 commit d20aaa8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/react-dom/src/__tests__/ReactUpdates-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,11 +887,10 @@ describe('ReactUpdates', () => {
'received: [object Object]',
);
component = ReactTestUtils.renderIntoDocument(<A />);
expect(() => component.forceUpdate({a: 1, b: 2})).toThrowError(
expect(() => component.setState({}, {a: 1, b: 2})).toThrowError(
'Invalid argument passed as callback. Expected a function. Instead ' +
'received: [object Object]',
);
expect(console.error.calls.count()).toBe(3);
});

it('throws in forceUpdate if the update callback is not a function', () => {
Expand Down Expand Up @@ -944,7 +943,6 @@ describe('ReactUpdates', () => {
'Invalid argument passed as callback. Expected a function. Instead ' +
'received: [object Object]',
);
expect(console.error.calls.count()).toBe(3);
});

it('does not update one component twice in a batch (#2410)', () => {
Expand Down

0 comments on commit d20aaa8

Please sign in to comment.