author-detail.page.spec.ts 1.36 KB
Newer Older
1
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
2
import {async, ComponentFixture, inject, TestBed} from '@angular/core/testing';
3

4 5 6 7 8
import {AuthorDetailPage} from './author-detail.page';
import {RouterModule} from '@angular/router';
import {IonicStorageModule} from '@ionic/storage';
import {TranslateTestingModule} from '../translate-testing/translate-testing.module';
import {APP_BASE_HREF} from '@angular/common';
9
import {HttpClientTestingModule} from '@angular/common/http/testing';
10 11

describe('AuthorDetailPage', () => {
12 13
    let component: AuthorDetailPage;
    let fixture: ComponentFixture<AuthorDetailPage>;
14

15 16 17 18
    beforeEach(async(() => {
        TestBed.configureTestingModule({
            declarations: [AuthorDetailPage],
            imports: [
19
                HttpClientTestingModule,
20 21 22 23 24 25 26 27 28 29 30
                IonicStorageModule.forRoot(),
                RouterModule.forRoot([]),
                TranslateTestingModule
            ],
            providers: [
                {provide: APP_BASE_HREF, useValue: '/'},
            ],
            schemas: [CUSTOM_ELEMENTS_SCHEMA],
        })
            .compileComponents();
    }));
31

32 33 34 35 36
    beforeEach(() => {
        fixture = TestBed.createComponent(AuthorDetailPage);
        component = fixture.componentInstance;
        fixture.detectChanges();
    });
37

38 39 40
    it('should create', () => {
        expect(component).toBeTruthy();
    });
41
});