I\'m confused about how to access value when using mount. Here\'s what I\'ve got as my test:
it(\'cancels changes w
In case anyone is struggling, I found the following working for me
const wrapper = mount( ); // component under test
const textField = wrapper.find(TextField);
textField.props().onChange({ target: { value: 'New Task 2' } })
textField.simulate('change');
// wrapper.update() didn't work for me, need to find element again
console.log(wrapper.find(TextField).props()); // New Task 2
It seems that you need to define what happens in the change event first and then simulate it (instead of simulating the change event with data)