What is the correct way of unit testing a React component prop update.
Here is my test fixture;
describe(\'updating the value\', function(){
This is an older question, but in case anyone else stumbles upon this, the following setup has worked for me nicely:
it('updates component on property update', () => {
let TestParent = React.createClass({
getInitialState() {
return {value: true};
},
render() {
return ;
}
});
component = TestUtils.renderIntoDocument( );
component.setState({value: false});
// Verification code follows
});
This makes React run the usual component update.