Merge pull request #3177 from sebmarkbage/fixbindwarningstring

Forgotten string
This commit is contained in:
Sebastian Markbåge
2015-02-17 18:26:32 -08:00
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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'
);
});