avoriaz
avoriaz copied to clipboard
Make children select work as it should
I have a question:
Sorry if I misunderstood the way it should work. I have the following html:
<div class='Item'>
<span>Span #1, in the div.
A
<div class='Item'> <span>B</span> </div>
</span>
</div>
and my test as:
wrapper.find('.Item > span').length == 1 // and 'should' be true but it returns 2
This is not how the css selector should behave?
This is the correct behavior I believe.
There are two elements that match that selector, the first span tag, and the second span tag. Both are direct descendants of an element with .Item class