File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/enzyme-adapter-react-16/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ const FunctionalComponent = 1;
2929const HostPortal = 4 ;
3030const HostComponent = 5 ;
3131const HostText = 6 ;
32+ const Mode = 11 ;
3233const ContextConsumer = 12 ;
3334const ContextProvider = 13 ;
3435
@@ -74,10 +75,6 @@ function toTree(vnode) {
7475 return toTree ( node . child ) ;
7576 case HostPortal : // 4
7677 return toTree ( node . child ) ;
77- case ContextProvider :
78- return toTree ( node . child ) ;
79- case ContextConsumer :
80- return toTree ( node . child ) ;
8178 case ClassComponent :
8279 return {
8380 nodeType : 'class' ,
@@ -88,8 +85,6 @@ function toTree(vnode) {
8885 instance : node . stateNode ,
8986 rendered : childrenToTree ( node . child ) ,
9087 } ;
91- case Fragment : // 10
92- return childrenToTree ( node . child ) ;
9388 case FunctionalComponent : // 1
9489 return {
9590 nodeType : 'function' ,
@@ -117,6 +112,11 @@ function toTree(vnode) {
117112 }
118113 case HostText : // 6
119114 return node . memoizedProps ;
115+ case Fragment : // 10
116+ case Mode : // 11
117+ case ContextProvider : // 13
118+ case ContextConsumer : // 12
119+ return childrenToTree ( node . child ) ;
120120 default :
121121 throw new Error ( `Enzyme Internal Error: unknown node with tag ${ node . tag } ` ) ;
122122 }
You can’t perform that action at this time.
0 commit comments