import { TestBed , inject } from '@angular/core/testing' ; import { PageTitleService } from './page-title.service' ; import { Title } from '@angular/platform-browser' ; describe ( 'PageTitleService' , ( ) => { const title = new Title ( { } ) ; const pageTitleService = new PageTitleService ( title ) ; beforeEach ( ( ) => { TestBed . configureTestingModule ( { providers : [ { provide : PageTitleService , useValue : pageTitleService } ] , } ) ; } ) ; it ( 'should initialize title to empty string' , inject ( [ PageTitleService ] , ( service ) => { expect ( service ) . toBeTruthy ( ) ; } ) ) ; } ) ;