mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit updates the docs examples to Angular v11.0.1. In addition to updating the dependencies versions, it also updates the project's structure and config to more closely match what a new v11 CLI app would look like. See, also, the [diff][1] between a basic v10.1.3 CLI app and a v11.0.2 one. NOTE: I refrained from disabling the Selenium Promise Manager (as seen [here][2]) and switching all e2e tests to `async/await`, because that is a big change and should be done in a separate commit/PR. [1]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3..11.0.2 [2]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3...11.0.2#diff-dbd675d74087d57cd084d6dd6ae24ae2eeff2ff0122680e12916052f8a843a29 PR Close #39818
31 lines
976 B
TypeScript
31 lines
976 B
TypeScript
import { TestBed } from '@angular/core/testing';
|
|
import { AppComponent } from './app.component';
|
|
|
|
describe('AppComponent', () => {
|
|
beforeEach(async () => {
|
|
await TestBed.configureTestingModule({
|
|
declarations: [
|
|
AppComponent
|
|
],
|
|
}).compileComponents();
|
|
});
|
|
|
|
it('should create the app', () => {
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
const app = fixture.componentInstance;
|
|
expect(app).toBeTruthy();
|
|
});
|
|
|
|
it(`should have as title 'component-overview'`, () => {
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
const app = fixture.componentInstance;
|
|
expect(app.title).toEqual('component-overview');
|
|
});
|
|
|
|
it('should render title', () => {
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
fixture.detectChanges();
|
|
const compiled = fixture.nativeElement;
|
|
expect(compiled.querySelector('.content span').textContent).toContain('component-overview app is running!');
|
|
});
|
|
});
|