chaijs/sinon-chai

lastCalledWith

appsforartists opened this issue · 1 comments

It would be nice to be able to assert the value of the most recent call, in idiomatic chai. How do you feel about:

expect(listener).to.have.been.lastCalledWith(value);
// equivalent to
expect(listener.lastCall).to.have.been.calledWith(value);

In general Sinon-Chai does not add asserters that do not correspond to Sinon.JS assertions. So this needs to be requested on the Sinon.JS repository first.