DEV Community

loading...

Stubbing jQuery with sinon

Jan Küster
Graduated in Digital Media M.Sc. now developing the next generation of educational software. Since a while I develop full stack in Javascript using Meteor. Love fitness and Muay Thai after work.
・1 min read

Yes, this is rather a notice than an article but here is the thing - I wasted nearly an hour to get this done so here is it:

sinon.stub(jQuery.fn, 'init').callsFake(fn)
Enter fullscreen mode Exit fullscreen mode

Discussion (0)