import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ExternalApiComponent } from './external-api.component'; import { AuthService } from '@auth0/auth0-angular'; describe('ExternalApiComponent', () => { let component: ExternalApiComponent; let fixture: ComponentFixture; let authServiceSpy: jasmine.SpyObj; beforeEach(() => { authServiceSpy = jasmine.createSpyObj('AuthService', ['loginWithRedirect']); TestBed.configureTestingModule({ declarations: [], imports: [HttpClientTestingModule], providers: [{ provide: AuthService, useValue: authServiceSpy }], }).compileComponents(); fixture = TestBed.createComponent(ExternalApiComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });