maciejtreder/angular-universal-pwa

View on GitHub
application/src/app/home/home.component.spec.ts

Summary

Maintainability
B
5 hrs
Test Coverage
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';

describe('Home component -', () => {
    let component: any;
    let fixture: ComponentFixture<HomeComponent>;

    beforeEach(() => {
        TestBed.configureTestingModule({
            declarations: [HomeComponent]
        });

        fixture = TestBed.createComponent(HomeComponent);
        fixture.detectChanges();
        component = fixture.debugElement.nativeElement;
    });

    it('title is \'Home\'', () => {
        expect(component.querySelector('h1').textContent).toBe('Home');
    });
});