-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: Adds recursive check for isEmptyRender #1924
Conversation
- [New] `utils`: add `recursiveEmptyRender` and `isEmptyValue` Fixes enzymejs#1866.
packages/enzyme/src/Utils.js
Outdated
const renderedKey = 'rendered'; | ||
|
||
function dive(renderedNodes) { | ||
const isList = renderedNodes && renderedNodes.length > 0 && Array.isArray(renderedNodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
= Array.isArray(renderedNodes) && renderedNodes.length > 0
?
packages/enzyme/src/Utils.js
Outdated
return isEmptyRender; | ||
} | ||
|
||
dive(nodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this not be return dive(nodes)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So initially I did have that. And then in my utils test cases, I was getting inconsistent return values. I will change back, bc this is something I prefer and research why.
9d57bf4
to
169809e
Compare
9e85957
to
7aea80b
Compare
Fixes #1866