Skip to content

Commit

Permalink
Merge pull request facebook#3177 from sebmarkbage/fixbindwarningstring
Browse files Browse the repository at this point in the history
Forgotten string
  • Loading branch information
sebmarkbage committed Feb 18, 2015
2 parents c612075 + 377319b commit 00a3b92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/classic/class/ReactClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ function bindAutoBindMethod(component, method) {
false,
'bind(): You are binding a component method to the component. ' +
'React does this for you automatically in a high-performance ' +
'way, so you can safely remove this call. See ',
'way, so you can safely remove this call. See %s',
componentName
);
return boundMethod;
Expand Down
7 changes: 4 additions & 3 deletions src/classic/class/__tests__/ReactBind-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ describe('autobinding', function() {
ReactTestUtils.renderIntoDocument(<TestBindComponent />)

expect(console.warn.argsForCall.length).toBe(1);
expect(console.warn.argsForCall[0][0]).toContain(
'You are binding a component method to the component. ' +
'React does this for you automatically'
expect(console.warn.argsForCall[0][0]).toBe(
'Warning: bind(): You are binding a component method to the component. ' +
'React does this for you automatically in a high-performance ' +
'way, so you can safely remove this call. See TestBindComponent'
);
});

Expand Down

0 comments on commit 00a3b92

Please sign in to comment.