mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #3177 from sebmarkbage/fixbindwarningstring
Forgotten string
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user