@@ -581,16 +581,11 @@ describe('ReactCompositeComponent', function() {
581581
582582 // Two warnings, one for the component and one for the div
583583 // We may want to make this expect one warning in the future
584- expect ( console . warn . mock . calls . length ) . toBe ( 2 ) ;
584+ expect ( console . warn . mock . calls . length ) . toBe ( 1 ) ;
585585 expect ( console . warn . mock . calls [ 0 ] [ 0 ] ) . toBe (
586- 'Warning: owner based context (keys: foo) does not equal parent based ' +
587- 'context (keys: ) while mounting Component ' +
588- '(see: http://fb.me/react-context-by-parent)'
589- ) ;
590- expect ( console . warn . mock . calls [ 1 ] [ 0 ] ) . toBe (
591- 'Warning: owner based context (keys: foo) does not equal parent based ' +
592- 'context (keys: ) while mounting ReactCompositeComponent ' +
593- '(see: http://fb.me/react-context-by-parent)'
586+ 'Warning: owner-based and parent-based contexts differ ' +
587+ '(values: `bar` vs `undefined`) for key (foo) ' +
588+ 'while mounting Component (see: http://fb.me/react-context-by-parent)'
594589 ) ;
595590
596591 } ) ;
@@ -629,17 +624,12 @@ describe('ReactCompositeComponent', function() {
629624
630625 // Two warnings, one for the component and one for the div
631626 // We may want to make this expect one warning in the future
632- expect ( console . warn . mock . calls . length ) . toBe ( 2 ) ;
627+ expect ( console . warn . mock . calls . length ) . toBe ( 1 ) ;
633628 expect ( console . warn . mock . calls [ 0 ] [ 0 ] ) . toBe (
634629 'Warning: owner-based and parent-based contexts differ ' +
635630 '(values: `noise` vs `bar`) for key (foo) while mounting Component ' +
636631 '(see: http://fb.me/react-context-by-parent)'
637632 ) ;
638- expect ( console . warn . mock . calls [ 1 ] [ 0 ] ) . toBe (
639- 'Warning: owner-based and parent-based contexts differ ' +
640- '(values: `noise` vs `bar`) for key (foo) while mounting ReactCompositeComponent ' +
641- '(see: http://fb.me/react-context-by-parent)'
642- ) ;
643633
644634 } ) ;
645635
@@ -686,18 +676,12 @@ describe('ReactCompositeComponent', function() {
686676
687677 // Two warnings, one for the component and one for the div
688678 // We may want to make this expect one warning in the future
689- expect ( console . warn . mock . calls . length ) . toBe ( 2 ) ;
679+ expect ( console . warn . mock . calls . length ) . toBe ( 1 ) ;
690680 expect ( console . warn . mock . calls [ 0 ] [ 0 ] ) . toBe (
691681 'Warning: owner-based and parent-based contexts differ ' +
692682 '(values: `noise` vs `bar`) for key (foo) while mounting Component ' +
693683 '(see: http://fb.me/react-context-by-parent)'
694684 ) ;
695- expect ( console . warn . mock . calls [ 1 ] [ 0 ] ) . toBe (
696- 'Warning: owner-based and parent-based contexts differ ' +
697- '(values: `noise` vs `bar`) for key (foo) while mounting ReactCompositeComponent ' +
698- '(see: http://fb.me/react-context-by-parent)'
699- ) ;
700-
701685 } ) ;
702686
703687 it ( 'should warn if context values differ on update using wrapper' , function ( ) {
@@ -746,18 +730,12 @@ describe('ReactCompositeComponent', function() {
746730
747731 // Two warnings, one for the component and one for the div
748732 // We may want to make this expect one warning in the future
749- expect ( console . warn . mock . calls . length ) . toBe ( 2 ) ;
733+ expect ( console . warn . mock . calls . length ) . toBe ( 1 ) ;
750734 expect ( console . warn . mock . calls [ 0 ] [ 0 ] ) . toBe (
751735 'Warning: owner-based and parent-based contexts differ ' +
752736 '(values: `noise` vs `bar`) for key (foo) while mounting Component ' +
753737 '(see: http://fb.me/react-context-by-parent)'
754738 ) ;
755- expect ( console . warn . mock . calls [ 1 ] [ 0 ] ) . toBe (
756- 'Warning: owner-based and parent-based contexts differ ' +
757- '(values: `noise` vs `bar`) for key (foo) while mounting ReactCompositeComponent ' +
758- '(see: http://fb.me/react-context-by-parent)'
759- ) ;
760-
761739 } ) ;
762740
763741 it ( 'unmasked context propagates through updates' , function ( ) {
0 commit comments