File tree 1 file changed +14
-0
lines changed
packages/enzyme-test-suite/test
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -679,6 +679,15 @@ describe('shallow', () => {
679
679
}
680
680
}
681
681
682
+ class WrappingComponent extends React . Component {
683
+ render ( ) {
684
+ const { children } = this . props ;
685
+ return (
686
+ < Provider value = "foo" > { children } </ Provider >
687
+ ) ;
688
+ }
689
+ }
690
+
682
691
class InnerComponent extends React . Component {
683
692
render ( ) {
684
693
return this . context ;
@@ -693,6 +702,11 @@ describe('shallow', () => {
693
702
const provider = provides . find ( InnerComponent ) . shallow ( ) ;
694
703
expect ( provider . text ( ) ) . to . equal ( 'foo' ) ;
695
704
} ) ;
705
+
706
+ it ( 'works with wrappingComponent' , ( ) => {
707
+ const wrapper = shallow ( < InnerComponent /> , { wrappingComponent : WrappingComponent } ) ;
708
+ expect ( wrapper . text ( ) ) . to . equal ( 'foo' ) ;
709
+ } ) ;
696
710
} ) ;
697
711
} ) ;
698
712
You can’t perform that action at this time.
0 commit comments