import { TestBed } from '@angular/core/testing'; import { CommonInterceptorService } from './common-interceptor.service'; import { Router } from '@angular/router'; describe('CommonInterceptorService', () => { let routerSpy; beforeEach(() => { routerSpy = jasmine.createSpyObj('Router', ['navigate']); TestBed.configureTestingModule({ providers: [{ provide: Router, useValue: routerSpy}], }); }); it('should be created', () => { const service: CommonInterceptorService = TestBed.get(CommonInterceptorService); expect(service).toBeTruthy(); }); });