import { ComponentFixture, TestBed } from "@angular/core/testing"; import { HomeComponent } from "./home.component"; describe("HomeComponent", () => { let component: HomeComponent; let fixture: ComponentFixture; let compiled: HTMLElement; beforeEach(async () => { await TestBed.configureTestingModule({ imports: [HomeComponent] }).compileComponents(); fixture = TestBed.createComponent(HomeComponent); component = fixture.componentInstance; fixture.detectChanges(); compiled = fixture.nativeElement; }); it("should create", () => { expect(component).toBeTruthy(); }); it("should render correctly", () => { const header = compiled.querySelector("h1"); expect(header?.innerText.trim()).toBe("Naomi Carrigan"); }); });