test: update testbed

This commit is contained in:
2025-12-11 21:09:57 -03:00
parent 515b762862
commit 2f1de6bea3

View File

@@ -1,10 +1,13 @@
import { TestBed } from '@angular/core/testing';
import { App } from './app';
import { strings } from './strings';
import { STRINGS_INJECTOR } from './app.config';
describe('App', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [App],
providers: [{ provide: STRINGS_INJECTOR, useValue: strings }],
}).compileComponents();
});
@@ -14,10 +17,4 @@ describe('App', () => {
expect(app).toBeTruthy();
});
it('should render title', () => {
const fixture = TestBed.createComponent(App);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, agenda-web');
});
});