A
ANGULAR
How do you test an Angular Component using `TestBed`?
Use `TestBed.configureTestingModule({ imports: [MyComponent], providers: [{ provide: ApiService, useValue: mockService }] }).compileComponents()`. Then call `TestBed.createComponent(MyComponent)` to retrieve the `ComponentFixture`, access DOM elements via `fixture.nativeElement`, trigger CD via `fixture.detectChanges()`, and verify outputs with Jasmine or Jest assertions.
◦ testing
