I have reviewed Jasmine\'s documentation of the toHaveBeenCalledWith matcher in order to understand whether it\'s possible to pass in a regular expression for an argument, i
Alternatively, if you are spying on a method on an object:
spyOn(obj, 'method'); obj.method('bar', 'baz'); expect(obj.method.argsForCall[0][0]).toMatch(/bar/); expect(obj.method.argsForCall[0][1]).toMatch(/baz/);