fengxiang
2018-07-11 5ff5fdaee98e8b2a0776ee5747292aa08a6b26df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { TestBed, TestModuleMetadata } from '@angular/core/testing';
import { APP_BASE_HREF } from '@angular/common';
import { setUpTestBed } from '@testing/common.spec';
 
import { AppComponent } from './app.component';
 
describe('Component: App', () => {
  setUpTestBed(<TestModuleMetadata>{
    declarations: [AppComponent],
    providers: [{ provide: APP_BASE_HREF, useValue: '/' }],
  });
 
  it('should create the app', () => {
    const fixture = TestBed.createComponent(AppComponent);
    const comp = fixture.debugElement.componentInstance;
    expect(comp).toBeTruthy();
  });
});