I am using Jest to test a ReactJS app. How can one test if the view controller has the necessary child components present.
For example, here is an example of the view controllers' render function:
// App.js
render: function() {
var table;
if (this.state.showResults) {
table = <Table {...this.state} />
}
return (
<div>
<Form />
{table}
)
}
For HTML elements, something like will do:
button = TestUtils.findRenderedDOMComponentWithTag AppElement, 'button'
How can I do the same for the Form or Table components ?
Thank you!