Open bskiff opened 6 years ago
Any status on this? My team is facing this issue. Using calledWithExactly
is much cleaner than expect(spy.lastCall.args).to.equal(expectedCall)
I've got a PR open here #141
I had the same problem and it was solved by using JSON.stringify(). Try this:
const fooObject = { foo: 'foo' }; const barObject = { bar: 'bar' }; const stub = sinon.stub();
stub(fooObject);
expect(stub).to.be.calledWithExactly(JSON.stringify(barObject));
Any news on this?
Any news? :eyes:
Any news on this?
Currently when a test fails it provides output the following way: e.g.
prints
It would be nice if this was a proper diff similar to what Chai's deep equal assertions provide. e.g.
prints
Editors such as IntelliJ IDEA have support for the latter style and will provide a nicely formatted diff in their diffing tools if that convention is followed.