DEV Community

Jan Küster
Jan Küster

Posted on

 

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)

Need a better mental model for async/await?

Check out this classic DEV post on the subject.

⭐️🎀 JavaScript Visualized: Promises & Async/Await

async await