mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
jasmine.ajax workarounds [ci:force]
This commit is contained in:
committed by
Anton Ramanovich
parent
3924590537
commit
97938098df
@@ -23,6 +23,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { AlfrescoApiService } from '../../services';
|
import { AlfrescoApiService } from '../../services';
|
||||||
import { AlfrescoApiServiceMock } from '../../mock';
|
import { AlfrescoApiServiceMock } from '../../mock';
|
||||||
|
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -34,7 +35,9 @@ describe('NodeCommentsService', () => {
|
|||||||
imports: [HttpClientTestingModule],
|
imports: [HttpClientTestingModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
// TODO: remove this as soon as unit test not using jasmine.Ajax
|
||||||
|
{ provide: AdfHttpClient, useValue: null }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(NodeCommentsService);
|
service = TestBed.inject(NodeCommentsService);
|
||||||
|
Reference in New Issue
Block a user