This repository has been archived by the owner. It is now read-only.

`assert.calledOnce` throws exception when arbitrary object is passed #70

Closed
augustl opened this Issue Feb 15, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@augustl
Member

augustl commented Feb 15, 2012

By mistake, I passed a plain object instead of a stub or spy to assert.calledOnce.

assert.calledOnce({});

This causes a "TypeError: this.fail is not a function". Seems like an unhandled case of some sorts. Should probably error with "Expected stub or spy, got {}" or something like that.

@ghost ghost assigned cjohansen Feb 15, 2012

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 21, 2012

What version? I'm seeing "[assert.calledOnce] [object Object] is not a function"

@augustl

This comment has been minimized.

Member

augustl commented Feb 21, 2012

So am I, this has apparently been fixed :)

@augustl augustl closed this Feb 21, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.