File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
packages/enzyme-test-suite/test Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -679,6 +679,15 @@ describe('shallow', () => {
679679 }
680680 }
681681
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+
682691 class InnerComponent extends React . Component {
683692 render ( ) {
684693 return this . context ;
@@ -693,6 +702,11 @@ describe('shallow', () => {
693702 const provider = provides . find ( InnerComponent ) . shallow ( ) ;
694703 expect ( provider . text ( ) ) . to . equal ( 'foo' ) ;
695704 } ) ;
705+
706+ it ( 'works with wrappingComponent' , ( ) => {
707+ const wrapper = shallow ( < InnerComponent /> , { wrappingComponent : WrappingComponent } ) ;
708+ expect ( wrapper . text ( ) ) . to . equal ( 'foo' ) ;
709+ } ) ;
696710 } ) ;
697711 } ) ;
698712
You can’t perform that action at this time.
0 commit comments