mattupstate/angular-pipeline-example

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

Summary

Maintainability
A
0 mins
Test Coverage
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { NavigationAnalyticsService } from './analytics/navigation-analytics.service';

describe('AppComponent', () => {
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [RouterTestingModule],
      declarations: [AppComponent],
      providers: [
        {
          provide: NavigationAnalyticsService,
          useValue: {
            startTracking: () => {}
          }
        }
      ]
    }).compileComponents();
  }));

  it('should create the app', () => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app).toBeTruthy();
  });

  it(`should have en-US as localeId`, () => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app.localeId).toEqual('en-US');
  });
});