Describe the bug
There's no obvious or documented way to reset the history of all fake
s.
To Reproduce
const sinon = require('sinon');
const fake = sinon.fake();
fake(1234);
sinon.resetHistory();
fake.getCalls() // returns [Call(1234)]
sinon.reset();
fake.getCalls() // returns [Call(1234)]
const sandbox = sinon.createSandbox();
const fake = sandbox.fake() // error, can't make fakes from sandboxes (why??)
Expected behavior
All the above behaviours should return [] instead of [Call(1234), and sandboxes should be able to create fakes (in order to reset a set of fakes together).
I agree.
Sandboxes, including the default sandbox sinon
, should be able to reset fakes.
So this issue is resolved?
Yes, with #1842
thanks guys.
Most helpful comment
Yes, with #1842