How do we clear the spy in a jasmine test suite programmatically? Thanks.
beforeEach(function() { spyOn($, \"ajax\").andCallFake(function(params){ }) })
I think that's what .reset() is for:
spyOn($, 'ajax'); $.post('http://someUrl', someData); expect($.ajax).toHaveBeenCalled(); $.ajax.calls.reset() expect($.ajax).not.toHaveBeenCalled();