Testing with real instances of dependencies causes our test code to know about the inner We inject the AuthService into the LoginComponent and the component shows a Login We achieve this by Mocking our dependencies. A Spy is a feature of Jasmine which lets you take an existing class, function, object and .