diff --git a/src/ReactWrapper.jsx b/src/ReactWrapper.jsx index 885742ded..11da3dda7 100644 --- a/src/ReactWrapper.jsx +++ b/src/ReactWrapper.jsx @@ -602,7 +602,9 @@ class ReactWrapper { * @returns {ReactWrapper} */ parents(selector) { - const allParents = this.wrap(this.single('parents', n => parentsOfInst(n, this.root.getNode()))); + const allParents = this.wrap( + this.single('parents', n => parentsOfInst(n, this.root.getNode())) + ); return selector ? allParents.filter(selector) : allParents; } diff --git a/src/ShallowWrapper.js b/src/ShallowWrapper.js index be361c9bd..7e731c1fb 100644 --- a/src/ShallowWrapper.js +++ b/src/ShallowWrapper.js @@ -152,7 +152,7 @@ class ShallowWrapper { if (this.root !== this) { throw new Error('ShallowWrapper::update() can only be called on the root'); } - this.single(() => { + this.single('update', () => { const instance = this.instance(); if (instance) { withSetStateAllowed(() => { @@ -664,7 +664,9 @@ class ShallowWrapper { * @returns {ShallowWrapper} */ parents(selector) { - const allParents = this.wrap(this.single('parents', n => parentsOfNode(n, this.root.getNode()))); + const allParents = this.wrap( + this.single('parents', n => parentsOfNode(n, this.root.getNode())) + ); return selector ? allParents.filter(selector) : allParents; }