less confusing messages for toHaveBeenCalledWith #193

merged 1 commit into from Oct 6, 2012


None yet
3 participants

slackersoft commented Mar 3, 2012

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

+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 commented May 14, 2012

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


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