fixing fhir-resource tests.
This commit is contained in:
parent
844a40fe5c
commit
8cbfcbfd39
|
@ -1,6 +1,7 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition.component';
|
import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition.component';
|
||||||
|
import {PipesModule} from '../../pipes/pipes.module';
|
||||||
|
|
||||||
describe('ReportMedicalHistoryConditionComponent', () => {
|
describe('ReportMedicalHistoryConditionComponent', () => {
|
||||||
let component: ReportMedicalHistoryConditionComponent;
|
let component: ReportMedicalHistoryConditionComponent;
|
||||||
|
@ -8,7 +9,8 @@ describe('ReportMedicalHistoryConditionComponent', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ ReportMedicalHistoryConditionComponent ]
|
declarations: [ ReportMedicalHistoryConditionComponent ],
|
||||||
|
imports: [PipesModule]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ describe('MedicalHistoryComponent', () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
|
||||||
// httpClientSpy = jasmine.createSpyObj('HttpClient', ['get']);
|
|
||||||
// fastenApiService = new FastenApiService(httpClientSpy, );
|
|
||||||
mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResourceGraph'])
|
mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResourceGraph'])
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ MedicalHistoryComponent ],
|
declarations: [ MedicalHistoryComponent ],
|
||||||
|
|
|
@ -1,16 +1,28 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { PatientProfileComponent } from './patient-profile.component';
|
import { PatientProfileComponent } from './patient-profile.component';
|
||||||
|
import {FastenApiService} from '../../services/fasten-api.service';
|
||||||
|
import {NgbModalModule} from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
import {of} from 'rxjs';
|
||||||
|
import {PipesModule} from '../../pipes/pipes.module';
|
||||||
|
|
||||||
describe('PatientProfileComponent', () => {
|
describe('PatientProfileComponent', () => {
|
||||||
let component: PatientProfileComponent;
|
let component: PatientProfileComponent;
|
||||||
let fixture: ComponentFixture<PatientProfileComponent>;
|
let fixture: ComponentFixture<PatientProfileComponent>;
|
||||||
|
let mockedFastenApiService
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResources'])
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ PatientProfileComponent ]
|
declarations: [ PatientProfileComponent ],
|
||||||
|
imports: [PipesModule],
|
||||||
|
providers: [{
|
||||||
|
provide: FastenApiService,
|
||||||
|
useValue: mockedFastenApiService
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
mockedFastenApiService.getResources.and.returnValue(of([{}]));
|
||||||
|
|
||||||
fixture = TestBed.createComponent(PatientProfileComponent);
|
fixture = TestBed.createComponent(PatientProfileComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|
Loading…
Reference in New Issue