-
Notifications
You must be signed in to change notification settings - Fork 40
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
Expose api #13
Expose api #13
Conversation
The React 0.14 changes are not relevant to this PR, so please leave those out. Also, please leave the As for the actual change - is there a reason you can't just use We've also got some discussion in #9 about what direction the API is going to take - feel free to weight on in that. |
For example:
In the above scenario, The plural alternative
For the above example, we could simply assert |
Ok, I can see that is a valid scenario - although I'd recommend against exact matches in general as they lead to brittle tests. How about a similar feature to http://sinonjs.org/docs/#sinon-match-api ?
This is more general, but should achieve the same thing. You'll also be able to use the predicate API discussed in #9 to use any matching approach at all, including Your point about |
|
The default implementation of I can fold this into the changes coming in #9 if you don't mind waiting a little bit - but would take a PR which added |
I will wait for #9 then. Thanks for the help! |
Closing this, but leaving #31 open for tracking |
For shallow rendering sometimes we just want to find the components with the exact matching props without regard to its children. Consider the following example:
In this case, we are not concerned whether its child is
I have implemented findComponentsWithoutChildren and findComponentsWithoutChildren to facilitate such testing.