Sinon – Checking if a function has been stubbed

Just a quick post here, in reference to using Sinon.jS, and checking whether or not a function has been stubbed.

Let’s say that you might have stubbed a function like this;

You can check to see if it’s been stubbed already, with this;

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *