I am using enzyme + jest to test react App, is it possible to trigger onKeyDown event on contetnteditable span element?
Editable text
I tried:
result.find('#name').simulate('keyDown', { key: 'm', keyCode: 77, which: 77 });,
but it did not work. Element content stayed unchanged.
Aucun commentaire:
Enregistrer un commentaire