Hello

Todd Halfpenny
Credit: London’s Calling

Hi, I’m Todd… and I’ve been interested in making things easier for as long as I can remember. Perhaps I’m lazy, maybe I’m not very clever… though if you ask me it’s just because I can’t believe that things have to be as difficult as they are.

I’ve been working with code since the late ’90s, and am currently Chief Mobile Technical Architect at MobileCaddy, where we’re helping Salesforce customers get the mobile apps their businesses deserve.

I love all things tech, and specifically anything related to Mobile, WordPress, and JavaScript.

Blog

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;