最佳答案
我们如何程序化地清除茉莉花测试套件中的间谍? 谢谢。
beforeEach(function() {
spyOn($, "ajax").andCallFake(function(params){
})
})
it("should do something", function() {
//I want to override the spy on ajax here and do it a little differently
})