diff --git a/src/classic/class/ReactClass.js b/src/classic/class/ReactClass.js index db58d92806..39a5b73b2f 100644 --- a/src/classic/class/ReactClass.js +++ b/src/classic/class/ReactClass.js @@ -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; diff --git a/src/classic/class/__tests__/ReactBind-test.js b/src/classic/class/__tests__/ReactBind-test.js index bd6a2a4d45..7e115ae273 100644 --- a/src/classic/class/__tests__/ReactBind-test.js +++ b/src/classic/class/__tests__/ReactBind-test.js @@ -137,9 +137,10 @@ describe('autobinding', function() { ReactTestUtils.renderIntoDocument() 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' ); });