chaijs / sinon-chai

Extends Chai with assertions for the Sinon.JS mocking framework.
Other
1.09k stars 108 forks source link

Support calling calledOnce as a function #121

Closed furstenheim closed 6 years ago

furstenheim commented 6 years ago

Hi, this is more a feature request than a bug. I see that the notation is expect(spy).calledOnce.

I understand that the error is thrown in the getter. However it feels a bit weird to have called executed in the getter. In fact even the IDE (webstorm) is marking the code as expression is nor assignment or call.

Would it be possible to allow calling it as a function? To make the intention more explicit?

domenic commented 6 years ago

No, I'm happy to have only one way to do things.