How to return fake data from spy.on(obj, 'funcName') when called ?

Viewed 6262

I don't know is there any function or not! Please let me know is it possible?

Something like that:

spy(obj, 'funcName').and.returnValue(5); // spy will return a fake data when 'funcName'called.

Well I am using mocha, chai-spies

2 Answers
Related