From 910ddb9955cbdaf7cbf1c7222ca41449c9775002 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Wed, 26 Aug 2020 12:39:55 +0200 Subject: [PATCH] Fix for unit tests --- src/app/app.component.spec.ts | 2 +- src/app/components/settings/settings.component.spec.ts | 8 +++++++- tsconfig.base.json | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 8f01ecbd..1eb4a588 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -9,7 +9,7 @@ import { ElectronService, NgxElectronModule } from 'ngx-electron'; import createSpyObj = jasmine.createSpyObj; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ProgressService } from './common/progress/progress.service'; -import 'jasmine'; +// import 'jasmine'; describe('AppComponent', () => { let component: AppComponent; diff --git a/src/app/components/settings/settings.component.spec.ts b/src/app/components/settings/settings.component.spec.ts index b62b14e2..192c4d60 100644 --- a/src/app/components/settings/settings.component.spec.ts +++ b/src/app/components/settings/settings.component.spec.ts @@ -14,11 +14,16 @@ import { SettingsService } from '../../services/settings.service'; import { ToasterService } from '../../services/toaster.service'; import { MockedToasterService } from '../../services/toaster.service.spec'; import { ConsoleService } from '../../services/settings/console.service'; +import { MapSettingsService } from '../../services/mapsettings.service'; describe('SettingsComponent', () => { let component: SettingsComponent; let fixture: ComponentFixture; let settingsService: SettingsService; + let mapSettingsService = { + integrateLinkLabelsToLinks: true, + toggleIntegrateInterfaceLabels(val: boolean) {} + }; let consoleService; beforeEach(async(() => { @@ -31,7 +36,8 @@ describe('SettingsComponent', () => { providers: [ SettingsService, { provide: ToasterService, useClass: MockedToasterService }, - { provide: ConsoleService, useValue: consoleService} + { provide: ConsoleService, useValue: consoleService }, + { provide: MapSettingsService, useValue: mapSettingsService } ], declarations: [SettingsComponent] }).compileComponents(); diff --git a/tsconfig.base.json b/tsconfig.base.json index dfc1b142..bb33fac1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -26,21 +26,21 @@ ], }, "include": [ - "./src/**/*", + "./src/**/*" ], "exclude": [ - "src/test.ts", + //"src/test.ts", "src/app/cartography/testing.ts", "src/app/cartography/tool.ts", "src/app/cartography/widgets/drawings.backup.ts", "src/app/converters/converter.ts", "src/app/models/software.ts", "src/app/services/testing.ts", - "src/app/testing/app-testing/app-testing.module.ts", + // "src/app/testing/app-testing/app-testing.module.ts", "src/environments/environment.electron.prod.ts", "src/environments/environment.electron.ts", "src/environments/environment.github.prod.ts", "src/environments/environment.prod.ts", - "**/*.spec.ts" + // "**/*.spec.ts" ] }