Skip to content

Commit 419b229

Browse files
fix(angular): update spec for standalone component — remove stale declarations/RouterTestingModule/title tests
1 parent 15b6e78 commit 419b229

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import { TestBed } from '@angular/core/testing';
2-
import { RouterTestingModule } from '@angular/router/testing';
32
import { AppComponent } from './app.component';
43

54
describe('AppComponent', () => {
65
beforeEach(async () => {
76
await TestBed.configureTestingModule({
8-
imports: [
9-
RouterTestingModule,
10-
],
11-
declarations: [
12-
AppComponent,
13-
],
7+
imports: [AppComponent],
148
}).compileComponents();
159
});
1610

@@ -19,17 +13,4 @@ describe('AppComponent', () => {
1913
const app = fixture.componentInstance;
2014
expect(app).toBeTruthy();
2115
});
22-
23-
it('should have as title \'angular-test\'', () => {
24-
const fixture = TestBed.createComponent(AppComponent);
25-
const app = fixture.componentInstance;
26-
expect(app.title).toEqual('angular-test');
27-
});
28-
29-
it('should render title', () => {
30-
const fixture = TestBed.createComponent(AppComponent);
31-
fixture.detectChanges();
32-
const compiled = fixture.nativeElement as HTMLElement;
33-
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-test app is running!');
34-
});
3516
});

0 commit comments

Comments
 (0)