Administration/src/app/app.component.spec.ts
Snoweuph 23b18912c7
Some checks failed
Build Application / build (push) Failing after 10s
Build Application / build-docker (push) Has been skipped
Build Application / release (push) Has been skipped
Quality Check / Linting (push) Successful in 22s
CHORE: setup
2025-02-02 15:52:33 +01:00

30 lines
1 KiB
TypeScript

import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it('should have the \'Tower-Defence-Administration\' title', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('Tower-Defence-Administration');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, Tower-Defence-Administration');
});
});