glenjamin / skin-deep

Test assertion helpers for use with React's shallowRender test utils
MIT License
200 stars 40 forks source link

Allow predicate to be subset of props #27

Closed hartzis closed 8 years ago

hartzis commented 8 years ago

This allows for the predicate to be an actual subset of the props. Solves what we were going for with #22 , and doesn't break any of the current tests.

Please let us know if this is this the direction you were going with Expand subTree functions to accept (selector, predicate).? https://github.com/glenjamin/skin-deep/issues/9#issuecomment-145968740

glenjamin commented 8 years ago

The tests are a bit light on this area - the intention was for this to be available as subTreeLike - to match the existing findComponentLike

hartzis commented 8 years ago

subTreeLike and everySubTreeLike will definitely solve what we are trying to do with #22

Apologies, for missing https://github.com/glenjamin/skin-deep/issues/9#issuecomment-144347882.

We are trying to not tie ourselves to html structure/presentation (classes/ids) and are excited to get our hands on those methods.

glenjamin commented 8 years ago

I'm going to close this, but feel free to reopen if you want to add the Like methods.

hartzis commented 8 years ago

Awesome, I'll give it a whirl today.