glenjamin / skin-deep

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

subTree requires all classNames to be passed #46

Closed simonsmith closed 8 years ago

simonsmith commented 8 years ago

If I have an element with multiple classNames it seems I have to pass all of them to subTree for it to match:

React.DOM.div({className: 'Test Component'});
// This doesn't match (would expect it to)
tree.subTree('.Test');

// This does, but quite verbose
tree.subTree('.Test.Component');
glenjamin commented 8 years ago

This should be working, there were some changes made to className handling this morning - can you confirm that this is still broken on 0.13.2 ?

simonsmith commented 8 years ago

Ah I missed that release, sorry. Yeah it works fine! Cheers