fixing tests

This commit is contained in:
Jason Kulatunga 2023-09-05 19:18:20 -07:00
parent 78677961d5
commit f5c245a0e2
No known key found for this signature in database
6 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MedicationComponent } from './medication.component';
import {NgbCollapseModule} from '@ng-bootstrap/ng-bootstrap';
import {RouterTestingModule} from '@angular/router/testing';
describe('MedicationComponent', () => {
let component: MedicationComponent;
@ -9,7 +10,7 @@ describe('MedicationComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [MedicationComponent, NgbCollapseModule]
imports: [MedicationComponent, NgbCollapseModule, RouterTestingModule]
})
.compileComponents();

View File

@ -10,7 +10,7 @@ describe('ProcedureComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ProcedureComponent, NgbCollapseModule],
imports: [ProcedureComponent, NgbCollapseModule, RouterTestingModule],
providers: [RouterTestingModule]
})

View File

@ -33,6 +33,7 @@ describe('AdverseEventModel', () => {
"text": "This was a mild rash on the left forearm"
})
expected.has_event = true
expected.code = { coding: [{ system: 'http://snomed.info/sct', code: '304386008', display: 'O/E - itchy rash' } ], text: 'This was a mild rash on the left forearm' }
expect(new AdverseEventModel(example1Fixture)).toEqual(expected);
});

View File

@ -32,6 +32,7 @@ describe('AllergyIntoleranceModel', () => {
expected.note = [{text: 'The criticality is high becasue of the observed anaphylactic reaction when challenged with cashew extract.'}]
expected.type = 'allergy'
expected.category = ['food']
expected.code = { coding: [{ system: 'http://snomed.info/sct', code: '227493005', display: 'Cashew nuts' } ] }
expected.patient = {reference: 'Patient/example'}
expect(new AllergyIntoleranceModel(example1Fixture)).toEqual(expected);

View File

@ -101,6 +101,8 @@ describe('CarePlanModel', () => {
// expected.periodStart = '2013-01-01'
expected.period_end = '2017-06-01'
expected.author = { reference: 'Practitioner/example', display: 'Dr Adam Careful' }
//@ts-ignore
expected.code = [{ text: 'Weight management plan' }]
expect(new CarePlanModel(weightLossPlanFixture)).toEqual(expected);
});

View File

@ -64,6 +64,7 @@ describe('EncounterModel', () => {
role: undefined
}
]
expected.code = { coding: [{ system: 'http://snomed.info/sct', code: '11429006', display: 'Consultation' }] }
expect(new EncounterModel(example3Fixture)).toEqual(expected);
});