This commit is contained in:
Bastian Wagner
2024-11-28 11:45:36 +01:00
parent d398b37007
commit 22dc6033c9
25 changed files with 5018 additions and 550 deletions

View File

@@ -1,10 +1,15 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { provideHttpClient } from '@angular/common/http';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
providers: [
provideHttpClient(),
provideHttpClient(),
]
}).compileComponents();
});
@@ -14,16 +19,4 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});
it(`should have the 'client' title`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('client');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, client');
});
});