mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Universal karma config
This commit is contained in:
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
import { beforeEachProviders } from '@angular/core/testing';
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { RenditionsService } from './renditions.service';
|
||||
import { AlfrescoApiService } from './AlfrescoApi.service';
|
||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||
@@ -85,20 +84,23 @@ describe('RenditionsService', () => {
|
||||
}
|
||||
};
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
RenditionsService
|
||||
];
|
||||
});
|
||||
beforeEach(() => {
|
||||
|
||||
beforeEach(inject([RenditionsService, AlfrescoApiService], (renditionsService: RenditionsService, apiService: AlfrescoApiService) => {
|
||||
jasmine.Ajax.install();
|
||||
service = renditionsService;
|
||||
apiService.setInstance(new AlfrescoApi({}));
|
||||
}));
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
RenditionsService
|
||||
]
|
||||
});
|
||||
|
||||
inject([RenditionsService, AlfrescoApiService], (renditionsService: RenditionsService, apiService: AlfrescoApiService) => {
|
||||
jasmine.Ajax.install();
|
||||
service = renditionsService;
|
||||
apiService.setInstance(new AlfrescoApi({}));
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jasmine.Ajax.uninstall();
|
||||
@@ -173,4 +175,3 @@ describe('RenditionsService', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
Reference in New Issue
Block a user