Skip to content

Commit

Permalink
Add console.error message content check
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dail authored and Brandon Dail committed Jun 1, 2016
1 parent b092181 commit 80b7506
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ describe('ReactStatelessComponent', function() {
ReactDOM.render(<StatelessComponentWithChildContext name="A" />, container);

expect(console.error.calls.count()).toBe(1);
expect(console.error.calls.argsFor(0)[0]).toContain(
'StatelessComponentWithChildContext(...): childContextTypes cannot ' +
'be defined on a statless component.'
);
});

it('should warn when stateless component returns array', function() {
Expand Down

0 comments on commit 80b7506

Please sign in to comment.