From bdb70b9c695f6caacaf108326568a2c3255aed49 Mon Sep 17 00:00:00 2001 From: Flo Date: Sun, 1 Nov 2026 11:04:34 +0100 Subject: [PATCH] chore: add component suffix, remove spec file --- src/app/{app.css => app.component.css} | 0 src/app/{app.html => app.component.html} | 0 src/app/{app.ts => app.component.ts} | 6 +++--- src/app/app.spec.ts | 24 ------------------------ src/main.ts | 4 ++-- 5 files changed, 5 insertions(+), 29 deletions(-) rename src/app/{app.css => app.component.css} (100%) rename src/app/{app.html => app.component.html} (100%) rename src/app/{app.ts => app.component.ts} (68%) delete mode 100644 src/app/app.spec.ts diff --git a/src/app/app.css b/src/app/app.component.css similarity index 100% rename from src/app/app.css rename to src/app/app.component.css diff --git a/src/app/app.html b/src/app/app.component.html similarity index 100% rename from src/app/app.html rename to src/app/app.component.html diff --git a/src/app/app.ts b/src/app/app.component.ts similarity index 68% rename from src/app/app.ts rename to src/app/app.component.ts index fb1e90e..da6d671 100644 --- a/src/app/app.ts +++ b/src/app/app.component.ts @@ -4,9 +4,9 @@ import { RouterOutlet } from '@angular/router'; @Component({ imports: [RouterOutlet], selector: 'app-root', - styleUrl: './app.css', - templateUrl: './app.html', + styleUrl: './app.component.css', + templateUrl: './app.component.html', }) -export class App { +export class AppComponent { protected readonly title = signal('mv-ng-typeahead'); } diff --git a/src/app/app.spec.ts b/src/app/app.spec.ts deleted file mode 100644 index ba3ee31..0000000 --- a/src/app/app.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { App } from './app'; - -describe('App', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [App], - }) - .compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(App); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it('should render title', async () => { - const fixture = TestBed.createComponent(App); - await fixture.whenStable(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain('Hello, mv-ng-typeahead'); - }); -}); diff --git a/src/main.ts b/src/main.ts index 5df75f9..35b00f3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; -import { App } from './app/app'; +import { AppComponent } from './app/app.component'; -bootstrapApplication(App, appConfig) +bootstrapApplication(AppComponent, appConfig) .catch((err) => console.error(err));