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
Hey, I'm liking the direction this library is heading. I think it has great potential to tidy up my React tests 👍
The only downside (and this is maybe rquery rather than chai-react, or something in between) the API is currently a bit awkward in places where it's unclear whether a method works against a collection or a single item.
For example:
constchild=$node.find('.value')expect(child).to.have.prop('id')// fails, need to use child[0]expect(child.text()).to.equal('hi')// works, no child[0] needed
Coming from JQuery, all methods are available on the collection interface and just pass through to the first item if there is only one.
The text was updated successfully, but these errors were encountered:
I assume you're referring to using rquery and chai-react together? I found myself wanting some better assertions myself while I was writing some tests today.
chai-react (or a new chai-rquery plugin) would need to have unique assertion names to avoid collision with other plugins like chai-jquery.
Definitely interested in exploring this in more depth.
Hey, I'm liking the direction this library is heading. I think it has great potential to tidy up my React tests 👍
The only downside (and this is maybe rquery rather than chai-react, or something in between) the API is currently a bit awkward in places where it's unclear whether a method works against a collection or a single item.
For example:
Coming from JQuery, all methods are available on the collection interface and just pass through to the first item if there is only one.
The text was updated successfully, but these errors were encountered: