Skip to content

Commit

Permalink
fixing fhir-resource tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Jan 16, 2023
1 parent 844a40f commit 8cbfcbf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
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;
let fixture: ComponentFixture<ReportMedicalHistoryConditionComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ReportMedicalHistoryConditionComponent ]
declarations: [ ReportMedicalHistoryConditionComponent ],
imports: [PipesModule]
})
.compileComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ],
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 8cbfcbf

Please sign in to comment.