Project

General

Profile

1
import { TestBed } from '@angular/core/testing';
2
import { provideRoutes } from '@angular/router';
3
import { RouterTestingModule } from '@angular/router/testing';
4

    
5
import { ApiService } from './shared';
6
import { AppComponent } from './app.component';
7

    
8
describe('App', () => {
9
  // provide our implementations or mocks to the dependency injector
10
  beforeEach(() => {
11
    TestBed.configureTestingModule({
12
      imports: [RouterTestingModule],
13
      declarations: [AppComponent],
14
      providers: [ApiService, provideRoutes([])]
15
    });
16
  });
17

    
18
  it('should have an url', () => {
19
    let fixture = TestBed.createComponent(AppComponent);
20
    fixture.detectChanges();
21
    expect(fixture.debugElement.componentInstance.url).toEqual('https://github.com/preboot/angular2-webpack');
22
  });
23

    
24
});
(4-4/7)