I would like to omit the function in addition to spying on it in Jasmine. How can i do this?
var o = { foo: function(){} };
var spy = spyOn(o, 'foo')
.andStubWith(function() { console.log('foo'); });
The reason I don't want to just overwrite the function in my test is because IIUC, Jasmine will cancel any spyware after each test.
source
share