DEV Community

Jan Küster
Jan Küster

Posted on

4 1

Stubbing jQuery with sinon

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

Top comments (0)

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay