Commit 2672e5a8 authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Add mock PouchdbService in business-model-view.component.spec.ts

parent d0a144a5
import { BusinessModelViewComponent } from './business-model-view.component';
import { createComponentFactory, Spectator } from '@ngneat/spectator';
import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator';
import { ReactiveFormsModule } from '@angular/forms';
import { MockComponent } from 'ng-mocks';
import { CanvasBuildingBlockComponent } from '../canvas-building-block/canvas-building-block.component';
import { RouterTestingModule } from '@angular/router/testing';
import { PouchdbService } from '../pouchdb.service';
describe('BusinessModelViewComponent', () => {
let spectator: Spectator<BusinessModelViewComponent>;
......@@ -13,6 +14,12 @@ describe('BusinessModelViewComponent', () => {
MockComponent(CanvasBuildingBlockComponent),
],
imports: [ReactiveFormsModule, RouterTestingModule],
providers: [
mockProvider(PouchdbService, {
getFeatureModel: () => new Promise(() => {
}),
})
]
});
beforeEach(() => spectator = createComponent());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment