Sinon: question: how to tell if a function has been spied/stubbed upon? (plugin development)

Created on 3 Aug 2014  ·  2Comments  ·  Source: sinonjs/sinon

Hi,

Working on angular-debaser, I have a situation in which I want to know if a function is a Sinon.JS stub. Currently I am checking for foo.displayName === 'stub' or foo.displayName === 'spy' but this might be flimsy, and was wondering if there was a canonical way to do it.

thanks,
Chris

Most helpful comment

All 2 comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brettz9 picture brettz9  ·  3Comments

OscarF picture OscarF  ·  4Comments

andys8 picture andys8  ·  4Comments

stevenmusumeche picture stevenmusumeche  ·  3Comments

fearphage picture fearphage  ·  3Comments