fixing tests
This commit is contained in:
parent
78677961d5
commit
f5c245a0e2
|
@ -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();
|
||||
|
|
|
@ -10,7 +10,7 @@ describe('ProcedureComponent', () => {
|
|||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ProcedureComponent, NgbCollapseModule],
|
||||
imports: [ProcedureComponent, NgbCollapseModule, RouterTestingModule],
|
||||
providers: [RouterTestingModule]
|
||||
|
||||
})
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue