Coding task · Angular course · Module 11: Testing
Practice: Service Mock
Jasmine creates a spy object with several methods using one function that takes a name and a list of methods. and.returnValue() sets the returned value. In providers you replace the service with a ready object: the { provide: ... } entry gets the field for a concrete value (not for a class or a factory).
Task
Complete the component test with a mocked service.