jasmine toHaveBeenCalledWith partial matching
Try
toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Function))
Jasmine 2:
expect(callback).toHaveBeenCalledWith(jasmine.objectContaining({
bar: "baz"
}));
https://jasmine.github.io/2.0/introduction.html