@@ -401,13 +401,25 @@ describe('create-react-class-integration', () => {
401401
402402 const container = document . createElement ( 'div' ) ;
403403
404- expect ( ( ) => ReactDOM . render ( < Component /> , container ) ) . toWarnDev (
404+ // Note: The below lifecycle warnings are unavoidable for now,
405+ // Until create-react-class recognizes the unsafe_* methods.
406+ // (If we try to use them before them, it will error because
407+ // we are defining the same method twice.)
408+ expect ( ( ) => ReactDOM . render ( < Component /> , container ) ) . toWarnDev ( [
405409 'Warning: MyComponent: isMounted is deprecated. Instead, make sure to ' +
406410 'clean up subscriptions and pending requests in componentWillUnmount ' +
407411 'to prevent memory leaks.' ,
412+ 'Warning: MyComponent: componentWillMount() is deprecated and will be ' +
413+ 'removed in the next major version. Please use ' +
414+ 'unsafe_componentWillMount() instead.' ,
415+ ] ) ;
416+
417+ expect ( ( ) => ReactDOM . render ( < Component /> , container ) ) . toWarnDev (
418+ 'Warning: MyComponent: componentWillUpdate() is deprecated and will be ' +
419+ 'removed in the next major version. Please use ' +
420+ 'unsafe_componentWillUpdate() instead.'
408421 ) ;
409422
410- ReactDOM . render ( < Component /> , container ) ;
411423 ReactDOM . unmountComponentAtNode ( container ) ;
412424 instance . log ( 'after unmount' ) ;
413425 expect ( ops ) . toEqual ( [
0 commit comments