xufenglei
2018-07-16 4150625e122fc47f3a4d2adfbe0e2f861dd35b8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
    });
});