import { ComponentFixture, getTestBed, TestBed } from '@angular/core/testing'; export const configureTestSuite: Function = () => { // tslint:disable-next-line:no-any const testBedApi: any = getTestBed(); // tslint:disable-next-line:no-any const originReset: any = TestBed.resetTestingModule; beforeAll( () => { TestBed.resetTestingModule(); TestBed.resetTestingModule = () => TestBed; } ); afterEach( () => { // tslint:disable-next-line:no-any testBedApi._activeFixtures.forEach( ( fixture: ComponentFixture ) => fixture.destroy() ); testBedApi._instantiated = false; } ); afterAll( () => { TestBed.resetTestingModule = originReset; TestBed.resetTestingModule(); } ); };