sinon icon indicating copy to clipboard operation
sinon copied to clipboard

Update sinon spy api documentation

Open ckwong90 opened this issue 9 years ago • 2 comments

I was looking a way to spy on an objects setter and getter function and noticed that it's not in the docs http://sinonjs.org/releases/v2.0.0-pre.6/spies, but the api is burried in an issue https://github.com/sinonjs/sinon/issues/917.

Add api docs for

sinon.spy(object, "method", ["type"]);  //Where type is either "setter" or "getter"

ckwong90 avatar Mar 06 '17 22:03 ckwong90

That is because we are reworking the API for that, and that it is currently undergoing a change. It is currently not possible with the release candidate. See #1297 for background info.

fatso83 avatar Mar 07 '17 05:03 fatso83

This is now on http://sinonjs.org/releases/v2.0.0/stubs/. See get and set methods.

fatso83 avatar Mar 19 '17 17:03 fatso83