Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spy.called to accept call count to verify call count #31

Closed
tinganho opened this issue Jan 22, 2014 · 2 comments
Closed

spy.called to accept call count to verify call count #31

tinganho opened this issue Jan 22, 2014 · 2 comments

Comments

@tinganho
Copy link
Contributor

It would be convenient to have a function for

spy.should.have.been.called(6).times // Throws an error if spy haven't been called 6 times

sinonjs/sinon#387 (comment)

@domenic
Copy link
Collaborator

domenic commented Jan 24, 2014

Hmm. Sinon–Chai only includes asserters that match the Sinon spy methods right now. We could also try to match the sinon.assert.* APIs, which has sinon.assert.callCount(spy, num).

I am thinking spy.should.have.callCount(5)?

Pull request welcome, in that case.

@domenic
Copy link
Collaborator

domenic commented Jan 25, 2014

Fixed by #32; will be in 2.5.0.

@domenic domenic closed this as completed Jan 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants