sinon icon indicating copy to clipboard operation
sinon copied to clipboard

How to replace stub function in a stub instance?

Open StevenRoan opened this issue 11 years ago • 1 comments

If I have create a instance by var a = sinon.createStubInstance(MyContructor).

How can I replace one of the stubbed function like var stub = sinon.stub(object, "method", func);.

The main reason I am doing this is want to achieve multiple callback workaround as this mentioned

StevenRoan avatar Oct 13 '15 10:10 StevenRoan

This does not seem like a bug or issue with the code, but rather a usage oriented question, for which this is the wrong channel. Try asking on the mailing lists or on IRC.

fatso83 avatar Oct 14 '15 14:10 fatso83