sinon expect to match object

JavaScript
expect(fnStub).to.have.been.calledWith(sinon.match({
  foo: 'foo',
  bar: 'bar'
}));
Source

Also in JavaScript: