You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of unexpected-dom internally means the power of it's object based diff is available. I've seen a few cases where this is very useful, like being able to check the value attribute of an input after adding an event etc.
All of that works, but I discovered some arguably more corner cases in children. Namely, I went to write test using the object spec diff and wanted to have certain children ignore - so I went for the following:
Note that currently the does not work for two reasons. The first, is the recent PR opened against unexpected-dom (unexpectedjs/unexpected-dom#219). The second, is that react elements in that array will not be converted mounted and rendered before the comparison. So, currently if you npm link in the PR you need to do:
I think it is a fair feature request and probably pretty doable. You just need to make a new to satisfy assertion on DOMElement against an object. Then you traverse the object and mount all JSX and hand it over to unexpected-dom. The most work would be in writing the tests.
The use of unexpected-dom internally means the power of it's object based diff is available. I've seen a few cases where this is very useful, like being able to check the value attribute of an input after adding an event etc.
All of that works, but I discovered some arguably more corner cases in
children
. Namely, I went to write test using the object spec diff and wanted to have certain children ignore - so I went for the following:Note that currently the does not work for two reasons. The first, is the recent PR opened against unexpected-dom (unexpectedjs/unexpected-dom#219). The second, is that react elements in that array will not be converted mounted and rendered before the comparison. So, currently if you
npm link
in the PR you need to do:The text was updated successfully, but these errors were encountered: