I\'m confused about how to access value when using
mount
. Here\'s what I\'ve got as my test:
it(\'cancels changes w
With Enzyme 3, if you need to change an input value but don't need to fire the onChange
function you can just do this (node
property has been removed):
wrapper.find('input').instance().value = "foo";
You can use wrapper.find('input').simulate("change", { target: { value: "foo" }})
to invoke onChange
if you have a prop for that (ie, for controlled components).