You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chai.spy.callsBackWith simply creates a spy that expects the last argument it was called with to be a callback function and calls it with the arguments provided in its constructor.
var methodA = chai.spy.callsBackWith(new Error('foo'));
methodA(cb);
// cb would be called with one argument: new Error('foo')
var methodB = chai.spy.callsBackWith(null, {id:12});
methodB(cb);
// cb would be called with two arguments: null and {id:12}
The text was updated successfully, but these errors were encountered:
nickcarenza
added a commit
to nickcarenza/chai-spies
that referenced
this issue
Apr 17, 2017
chai.spy.callsBackWith
simply creates a spy that expects the last argument it was called with to be a callback function and calls it with the arguments provided in its constructor.The text was updated successfully, but these errors were encountered: