Use react's testutils with jquery elements

37 Views Asked by At

I am trying to test a react page. Using .trigger("input", {which: 65}) doesn't seem to invoke the SyntheticEvent. So I was wondering if was possible to combine jQuery and .simulate of the testUtils somehow?

Basically, i am trying to do something like

$('selector').simulate('input', ...)
1

There are 1 best solutions below

0
Amid On

I am afraid you cannot. Using TestUtils you operate with virtual dom - therefore you cannot use jquery.

You can check this tutorial for more info on the options you have for testing react apps.