I am using jest to test my reactJS component. In my reactJS component, I need to use jquery UI, so I added this in the component:
var jQuery = require('jquery');
require('jquery-ui/ui/core');
require('jquery-ui/ui/draggable');
require('jquery-ui/ui/resizable');
And it worked fine. But, now, I need to used jest to do testing, but I immediately meet this issue when I load the component into testutils,
Test suite failed to run
ReferenceError: jQuery is not defined
Has anyone met this issue if you are using jQuery in your app?
Thanks