To mock a service in Angular tests, you often replace the real service with a ______ service.
- Mock
- Spy
- Stub
- TestBed
In Angular testing, you typically replace the real service with a "Spy" service. A spy allows you to track calls to service methods, set up return values, and perform other testing-related tasks while avoiding actual service execution.
Loading...
Related Quiz
- When defining auxiliary routes in Angular, the route paths are prefixed with ________.
- The routerLink directive can be bound to an array, allowing you to pass ________ to the route.
- In Angular's reactive forms, the method used to mark a control as touched is called ______.
- You are developing an Angular application where a child component needs to notify its parent component about certain events. Which mechanism would you use?
- After applying AOT compilation, a developer notices that certain dynamic components no longer render correctly. What could be a potential reason for this?