@@ -283,8 +283,10 @@ module.exports = function (chai, _) {
283283
284284 this . assert (
285285 passed === calls . length
286- , 'expected ' + this . _obj + ' to have been always called with #{exp} but got ' + passed + ' out of ' + calls . length
287- , 'expected ' + this . _his + ' to have not always been called with #{exp}'
286+ , 'expected ' + this . _obj + ' to have been always called with ' + _ . inspect ( args , false , 2 )
287+ + ', but it was actually called ' + passed + ' times with those arguments out of ' + calls . length + ' total calls'
288+ , 'expected ' + this . _his + ' to have not always been called with ' + _ . inspect ( args , false , 2 )
289+ + ', but it was actually called ' + passed + ' times with those arguments out of ' + calls . length + ' total calls'
288290 , args
289291 ) ;
290292 } else {
@@ -301,8 +303,15 @@ module.exports = function (chai, _) {
301303
302304 this . assert (
303305 passed > 0
304- , 'expected ' + this . _obj + ' to have been called with #{exp}'
305- , 'expected ' + this . _his + ' to have not been called with #{exp} but got ' + passed + ' times'
306+ , 'expected ' + this . _obj + ' to have been called with ' + _ . inspect ( args , false , 2 ) + ' at least once'
307+ + ( calls . length
308+ ? ', but it was actually called ' + calls . length + ' times with:' + calls . map ( function ( call , i ) {
309+ return '\ncall #' + ( i + 1 ) + ': ' + _ . inspect ( call , false , 2 ) ;
310+ } ) . join ( '' )
311+ : ', but it was actually not called'
312+ )
313+ , 'expected ' + this . _his + ' to have not been called with ' + _ . inspect ( args , false , 2 )
314+ + ', but it actually was called ' + passed + ' times with those arguments, out of ' + calls . length + ' total calls'
306315 , args
307316 ) ;
308317 }
0 commit comments