Compare commits

..

No commits in common. "9bb792f233790dc99452f002bb1dfb37806df026" and "fc741596b3588b3d82846203fd5d86dbe3910a74" have entirely different histories.

4 changed files with 29 additions and 4 deletions

25
src/app/app.spec.ts Normal file
View File

@ -0,0 +1,25 @@
import { provideZonelessChangeDetection } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { App } from './app';
describe('App', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [App],
providers: [provideZonelessChangeDetection()]
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(App);
const app = fixture.componentInstance;
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, angular-tour-of-heroes');
});
});

View File

@ -4,9 +4,9 @@ import { RouterOutlet } from '@angular/router';
@Component({
selector: 'app-root',
imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
templateUrl: './app.html',
styleUrl: './app.scss'
})
export class App {
protected title = 'angular-tour-of-heroes';
}
}

View File

@ -1,6 +1,6 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { App } from './app/app.component';
import { App } from './app/app';
bootstrapApplication(App, appConfig)
.catch((err) => console.error(err));