This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
universal-statuspage/src/app/app.component.spec.ts

36 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-11-27 18:07:12 +00:00
import { TestBed, waitForAsync } from '@angular/core/testing';
2020-05-04 23:33:14 +00:00
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
2020-11-27 18:07:12 +00:00
beforeEach(waitForAsync(() => {
2020-05-04 23:33:14 +00:00
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
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 'universal-statuspage'`, () => {
2020-05-04 23:33:14 +00:00
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('universal-statuspage');
2020-05-04 23:33:14 +00:00
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('universal-statuspage app is running!');
2020-05-04 23:33:14 +00:00
});
});