import { HttpClient } from '@angular/common/http'; import { TestBed, inject } from '@angular/core/testing'; import { ConfigService } from '@arrow/bom/config'; import { AnalyticsService, MessageBusService, SocketsService, UserService } from '@arrow/bom/core'; import { SettingsService } from './settings.service'; describe('SettingsService', () => { beforeEach(() => { const httpClientSpyObj = jasmine.createSpyObj('HttpClient', ['post', 'get']); const configServiceSpyObj = jasmine.createSpyObj('ConfigService', { 'apiUrlWithoutVersion': 'some url', }); TestBed.configureTestingModule({ providers: [ SettingsService, { provide: HttpClient, useValue: httpClientSpyObj }, { provide: SocketsService, useValue: {} }, { provide: MessageBusService, useValue: {} }, { provide: ConfigService, useValue: configServiceSpyObj }, { provide: UserService, useValue: {} }, { provide: AnalyticsService, useValue: {} } ] }); }); it('should be created', inject([SettingsService], (service: SettingsService) => { expect(service).toBeTruthy(); } )); });