-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Description
scryRenderedComponentsWithType spits the following:
findAllInRenderedTree(...): instance must be a composite component
test case:
class Accordion extends React.Component {
render() {
return (<div>{ this.props.children }</div>);
}
}
const tree = ReactTestUtils.renderIntoDocument(
<div>
<Accordion height={ 0 }>
<div>Hello</div>
</Accordion>
</div>
);
const elements = ReactTestUtils.scryRenderedComponentsWithType(tree, Accordion);
expect(elements[0].clientHeight).to.be.equal(0);