File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 4949 "eslint-plugin-jsx-a11y" : " ^6.0.3" ,
5050 "eslint-plugin-react" : " ^7.6.1"
5151 }
52- }
52+ }
Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ function getRootNode(node) {
9797 return node . rendered ;
9898}
9999
100+ function getRootNodeInternal ( wrapper ) {
101+ return wrapper [ ROOT ] [ NODE ] ;
102+ }
103+
100104function privateSetNodes ( wrapper , nodes ) {
101105 if ( ! Array . isArray ( nodes ) ) {
102106 privateSet ( wrapper , NODE , nodes ) ;
@@ -150,10 +154,6 @@ class ShallowWrapper {
150154 return this [ ROOT ] ;
151155 }
152156
153- getRootNodeInternal ( ) {
154- return this [ ROOT ] [ NODE ] ;
155- }
156-
157157 getNodeInternal ( ) {
158158 if ( this . length !== 1 ) {
159159 throw new Error ( 'ShallowWrapper::getNode() can only be called when wrapping one node' ) ;
@@ -803,7 +803,7 @@ class ShallowWrapper {
803803 * @returns {ShallowWrapper }
804804 */
805805 parents ( selector ) {
806- const allParents = this . wrap ( this . single ( 'parents' , n => parentsOfNode ( n , this . getRootNodeInternal ( ) ) ) ) ;
806+ const allParents = this . wrap ( this . single ( 'parents' , n => parentsOfNode ( n , getRootNodeInternal ( this ) ) ) ) ;
807807 return selector ? allParents . filter ( selector ) : allParents ;
808808 }
809809
You can’t perform that action at this time.
0 commit comments