generated from nhcarrigan/template
30 lines
797 B
TypeScript
30 lines
797 B
TypeScript
import { ComponentFixture, TestBed } from "@angular/core/testing";
|
|
|
|
import { HomeComponent } from "./home.component";
|
|
|
|
describe("HomeComponent", () => {
|
|
let component: HomeComponent;
|
|
let fixture: ComponentFixture<HomeComponent>;
|
|
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");
|
|
});
|
|
});
|