Skip to content

less confusing messages for toHaveBeenCalledWith #193

Merged
merged 1 commit into from Oct 6, 2012

3 participants

@slackersoft
Jasmine member

I've run into this a couple of times where the failure message for toHaveBeenCalledWith looks like you've passed in an array of arrays, when really it's just printing out the array of arguments arrays, so I fixed it to make it a bit more obvious what the heck was going on

@creynders

+1 for clearer messages.

I just got the following beauty:
Expected spy actionSpy to have been called with [ [ { type : 'enter', from : 'green', to : 'orange' } ] ] but was called with [ [ { type : 'enter', from : 'green', to : 'orange' } ] ]

A bit confusing, right?
I know how this happened though, I passed the expected payload object within an array to the toHaveBeenCalledWith method.

@ragaskar ragaskar merged commit a1ed567 into jasmine:master Oct 6, 2012
@ragaskar
ragaskar commented Oct 6, 2012

Merged, but we'll need to rebuild before it makes it into the main jasmine.js src.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.