When testing a directive, which testing utility can be used to interact with a directive's host element?
- ComponentFixture
- DebugElement
- TestBed
- TestHostDirective
In Angular testing, you can use the DebugElement to interact with a directive's host element, query elements, and trigger events.
Loading...
Related Quiz
- In Angular testing, what is the purpose of the async and fakeAsync utilities?
- How can you ensure that a user is redirected to a login page when attempting to access a protected child route without proper authentication?
- Which Angular CLI command is used to generate a new component?
- Which Angular CLI command is used to create a new Angular project?
- What is the advantage of using a Route Resolver over fetching data directly in the component?