Test runner improvements

- now all tests are running
This commit is contained in:
Denys Vuika
2016-06-23 13:41:58 +01:00
committed by Will Abson
parent 58a21ea4ad
commit 1296087170
4 changed files with 51 additions and 27 deletions

View File

@@ -16,16 +16,13 @@
*/
import { provide } from '@angular/core';
import {
TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
} from '@angular/platform-browser-dynamic/testing';
import { it, describe, expect, inject, beforeEachProviders, setBaseTestProviders } from '@angular/core/testing';
import { it, describe, expect, inject, beforeEachProviders } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import { RouteParams } from '@angular/router-deprecated';
import { AlfrescoSearchComponent } from './alfresco-search.component';
import { SearchServiceMock } from './../assets/alfresco-search.service.mock';
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
import { TranslationMock } from './../assets/translation.service.mock';
import {
AlfrescoSettingsService,
AlfrescoAuthenticationService,
@@ -36,15 +33,13 @@ describe('AlfrescoSearchComponent', () => {
let searchService;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
beforeEachProviders(() => {
searchService = new SearchServiceMock();
return [
searchService.getProviders(),
provide(AlfrescoThumbnailService, {}),
provide(AlfrescoTranslationService, {}),
provide(AlfrescoTranslationService, {useClass: TranslationMock}),
provide(AlfrescoSettingsService, {}),
provide(AlfrescoAuthenticationService, {}),
provide(AlfrescoContentService, {})