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