fixing fhir-resource tests.

This commit is contained in:
Jason Kulatunga 2023-01-16 10:25:01 -08:00
parent 844a40fe5c
commit 8cbfcbfd39
3 changed files with 16 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReportMedicalHistoryConditionComponent } from './report-medical-history-condition.component';
import {PipesModule} from '../../pipes/pipes.module';
describe('ReportMedicalHistoryConditionComponent', () => {
let component: ReportMedicalHistoryConditionComponent;
@ -8,7 +9,8 @@ describe('ReportMedicalHistoryConditionComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ReportMedicalHistoryConditionComponent ]
declarations: [ ReportMedicalHistoryConditionComponent ],
imports: [PipesModule]
})
.compileComponents();

View File

@ -13,8 +13,6 @@ describe('MedicalHistoryComponent', () => {
beforeEach(async () => {
// httpClientSpy = jasmine.createSpyObj('HttpClient', ['get']);
// fastenApiService = new FastenApiService(httpClientSpy, );
mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResourceGraph'])
await TestBed.configureTestingModule({
declarations: [ MedicalHistoryComponent ],

View File

@ -1,16 +1,28 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
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', () => {
let component: PatientProfileComponent;
let fixture: ComponentFixture<PatientProfileComponent>;
let mockedFastenApiService
beforeEach(async () => {
mockedFastenApiService = jasmine.createSpyObj('FastenApiService', ['getResources'])
await TestBed.configureTestingModule({
declarations: [ PatientProfileComponent ]
declarations: [ PatientProfileComponent ],
imports: [PipesModule],
providers: [{
provide: FastenApiService,
useValue: mockedFastenApiService
}]
})
.compileComponents();
mockedFastenApiService.getResources.and.returnValue(of([{}]));
fixture = TestBed.createComponent(PatientProfileComponent);
component = fixture.componentInstance;