Fix for unit tests

This commit is contained in:
piotrpekala7 2020-08-26 12:39:55 +02:00
parent 29a8b9f527
commit 910ddb9955
3 changed files with 12 additions and 6 deletions

View File

@ -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;

View File

@ -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<SettingsComponent>;
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();

View File

@ -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"
]
}