Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should be created', () => {
const service: MatomoTracker = TestBed.get(MatomoTracker);
expect(service).toBeTruthy();
});
});
let link: Link = {} as Link;
link.nodes = [
{
node_id: '1',
adapter_number: 0,
port_number: 0,
label: {} as Label
},
{
node_id: '2',
adapter_number: 0,
port_number: 0,
label: {} as Label
}
];
mockedLinksDataSource = TestBed.get(LinksDataSource);
spyOn(mockedLinksDataSource, 'get').and.returnValue(link);
spyOn(mockedLinkService, 'updateNodes').and.returnValue(Observable.of({}));
mockedLinksEventSource.interfaceDragged.emit(interfaceLabelDraggedDataEvent);
expect(mockedLinkService.updateNodes).toHaveBeenCalled();
});
});
TestBed.configureTestingModule({
providers: [
XmppChatConnectionService,
{provide: XmppClientFactoryService, useValue: mockClientFactory},
XmppChatAdapter,
{provide: LogService, useValue: testLogService()},
ContactFactoryService
]
});
chatConnectionService = TestBed.get(XmppChatConnectionService);
chatConnectionService.client = xmppClientMock;
contactFactory = TestBed.get(ContactFactoryService);
chatAdapter = TestBed.get(XmppChatAdapter);
logService = TestBed.get(LogService);
chatAdapter.addPlugins([new RosterPlugin(chatAdapter, logService)]);
chatConnectionService.userJid = parseJid('me', 'example.com', 'something');
});
{provide: DataService, useValue: dataService}, {
provide: ActivatedRoute,
useValue: {
paramMap: Observable.of(
convertToParamMap({projectId: '123', buildId: '3'}))
}
}
]
})
.compileComponents();
fixture = TestBed.createComponent(BuildComponent);
fixtureEl = fixture.debugElement;
component = fixture.componentInstance;
location = TestBed.get(Location);
});
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientModule, HttpClientTestingModule, RouterTestingModule.withRoutes(routes)],
providers: [
WorkbasketService,
HttpClient,
HttpTestingController,
DomainService,
RequestInProgressService],
declarations: [DummyDetailComponent]
});
httpClient = TestBed.get(HttpClient);
workbasketService = TestBed.get(WorkbasketService);
domainService = TestBed.get(DomainService);
});
},
},
{
provide: LOCAL_STORAGE_TOKEN,
useValue: {
removeItem: jest.fn(),
setItem: jest.fn(),
getItem: jest.fn(_ => JSON.stringify([])),
},
},
provideMockActions(() => actions$),
],
});
db = TestBed.get(BookStorageService);
effects = TestBed.get(CollectionEffects);
actions$ = TestBed.get(Actions);
});
describe('checkStorageSupport$', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [ServiceBindingUsagesService],
});
serviceBindingUsagesService = TestBed.get(ServiceBindingUsagesService);
httpClientMock = TestBed.get(HttpTestingController);
});
beforeEach(() => {
service = TestBed.get(ProjectTreeHelper);
});
beforeEach(() => {
fixture = TestBed.createComponent(DataDrivenFilterComponent);
component = fixture.componentInstance;
frameworkService = TestBed.get(FrameworkService);
formService = TestBed.get(FormService);
cacheService = TestBed.get(CacheService);
userService = TestBed.get(UserService);
resourceService = TestBed.get(ResourceService);
publicDataService = TestBed.get(PublicDataService);
spyOn(publicDataService, 'get').and.callFake((options) => {
if (options.url === 'channel/v1/read/' + mockHashTagId && makeChannelReadSuc) {
return of({result: {channel: {defaultFramework: mockFrameworkInput}}});
} else if (options.url === 'framework/v1/read/' + mockFrameworkInput && makeFrameworkReadSuc) {
return of({result: {framework: {code: mockFrameworkInput, categories: mockFrameworkCategories}}});
}
return throwError({});
});
spyOn(publicDataService, 'post').and.callFake((options) => {
if (makeFormReadSuc) {
return of({result: {form: {data: {fields: mockFormFields}}}});
}
return throwError({});
});
});
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
WorkflowActionService,
JointUIService,
UndoRedoService,
{ provide: OperatorMetadataService, useClass: StubOperatorMetadataService }
],
imports: [UndoRedoService]
});
service = TestBed.get(WorkflowActionService);
texeraGraph = (service as any).texeraGraph;
jointGraph = (service as any).jointGraph;
});