25

I've tried:

input.simulate('blur');

and

input.simulate('onBlur');

None of these work. Is this even available in Enzyme (I'm using version 2.4.1).

1
  • 4
    I've used simulate('blur'); before and it works just fine.
    – Chris
    Commented Aug 15, 2016 at 20:55

1 Answer 1

41

input.simulate('focus'), input.simulate('change') and input.simulate('blur') should work. Check if your input is actually a node declared as _wrapper.find('input') and exists. Secondly, there's another question similar to this one: Enzyme - How to access and set <input> value? And finally if you check the source code of the ReactWrapper component then you will find that it uses all events that React can recognize. So the error is somewhere in your code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.