Skip to content

Commit

Permalink
[Refactor] Transform matchesElement to RST node
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyerburgh authored and ljharb committed Dec 8, 2017
1 parent 161172d commit bd12012
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/enzyme/src/ReactWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ class ReactWrapper {
* @returns {Boolean}
*/
matchesElement(node) {
return this.single('matchesElement', () => nodeMatches(node, this.getNodeInternal(), (a, b) => a <= b));
const rstNode = getAdapter().elementToNode(node);
return this.single('matchesElement', () => nodeMatches(rstNode, this.getNodeInternal(), (a, b) => a <= b));
}

/**
Expand Down

0 comments on commit bd12012

Please sign in to comment.