Unit testing with default Angular installation
De Basef
Getting instance of a service
let mockedLoginService = TestBed.get(LoginService);
Asserting that some method is called
let spySomeMethod = spyOn(someInstance, 'someMethod'); // do something here expect(spySomeMethod).toHaveBeenCalled();