describe('testappserviceone add method functionality', function(){
beforeEach(function () {
spyOn(testappServiceone(10,15),'add').and.callThrough();
});
it('testappServiceone add method functionality', function() {
testappServiceone(10,15).add();
expect(testappServiceone(10,15).add).toHaveBeenCalled();
});
});
The Exception I am getting is
Error: <toHaveBeenCalled> : Expected a spy, but got Function.
Usage: expect(<spyObj>).toHaveBeenCalled()
Please help me to understand and solve this problem