enzyme-adapter-react-16
Advanced tools
Comparing version 1.13.2 to 1.14.0
{ | ||
"name": "enzyme-adapter-react-16", | ||
"version": "1.13.2", | ||
"version": "1.14.0", | ||
"description": "JavaScript Testing utilities for React", | ||
@@ -5,0 +5,0 @@ "homepage": "http://airbnb.io/enzyme/", |
@@ -111,2 +111,6 @@ /* eslint no-use-before-define: 0 */ | ||
function unmemoType(type) { | ||
return isMemo(type) ? type.type : type; | ||
} | ||
function elementToTree(el) { | ||
@@ -768,5 +772,14 @@ if (!isPortal(el)) { | ||
const { type } = node; | ||
return React.createElement(isMemo(type) ? type.type : type, propsWithKeysAndRef(node)); | ||
return React.createElement(unmemoType(type), propsWithKeysAndRef(node)); | ||
} | ||
// eslint-disable-next-line class-methods-use-this | ||
matchesElementType(node, matchingType) { | ||
if (!node) { | ||
return node; | ||
} | ||
const { type } = node; | ||
return unmemoType(type) === unmemoType(matchingType); | ||
} | ||
elementToNode(element) { | ||
@@ -773,0 +786,0 @@ return elementToTree(element); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
253126
2665