Skip to content
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

Object property selector #105

Closed
blainekasten opened this issue Jan 8, 2016 · 1 comment
Closed

Object property selector #105

blainekasten opened this issue Jan 8, 2016 · 1 comment

Comments

@blainekasten
Copy link
Contributor

From @hartzis:

I'm really excited to see support for attribute/prop selectors, but it feels like this is coding to the wrong abstraction. Under the hood JSX is javascript and this solution seems right if this was html.

Instead of a CSS selector why not supply an object of props to search for?
<Foo foo="bar" /> => expect(wrapper.find({foo:"bar"})) => match
<Foo foo="bar" blah="sheep" /> => expect(wrapper.find({foo:"bar"})) => match?

@lelandrichardson
Copy link
Collaborator

Added in 1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants