Skip to content

Commit 32716f6

Browse files
fix(angular): update spec for standalone component — remove stale declarations/RouterTestingModule/title tests
1 parent 0ae4311 commit 32716f6

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

Lines changed: 1 addition & 14 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,11 +13,4 @@ describe('AppComponent', () => {
1913
const app = fixture.componentInstance;
2014
expect(app).toBeTruthy();
2115
});
22-
23-
it('should render title', () => {
24-
const fixture = TestBed.createComponent(AppComponent);
25-
fixture.detectChanges();
26-
const compiled = fixture.nativeElement as HTMLElement;
27-
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-test app is running!');
28-
});
2916
});

0 commit comments

Comments
 (0)