Error: <toHaveBeenCalled> : Expected a spy, but got Object({ authUser: spy on AuthService.authUser }). Usage: expect(<spyObj>).toHaveBeenCalled()

I’m trying to create a mock service so that after clicking on the form button, the click handler is called and subsequently a method from my mock service is called. What could be wrong here? Just started to deal with Jasmine. My test: describe(‘Login submit’, () => { let component: LoginComponent; let fixture: ComponentFixture<LoginComponent>; beforeEach(async… Read More Error: <toHaveBeenCalled> : Expected a spy, but got Object({ authUser: spy on AuthService.authUser }). Usage: expect(<spyObj>).toHaveBeenCalled()