Skip to content

Commit

Permalink
(chore) Bump testing dependencies and fix test console warnings (#1553)
Browse files Browse the repository at this point in the history
* (chore) Bump testing dependencies and fix test console warnings

* Try to fix issues with types not get loaded correctly in VSCode

* Fixup

* Fixup

* Add jest setup file to tsconfig includes for all packages and restore disabled tests
  • Loading branch information
denniskigen authored Jan 3, 2024
1 parent 8da491d commit 516f991
Show file tree
Hide file tree
Showing 115 changed files with 2,813 additions and 4,500 deletions.
1 change: 1 addition & 0 deletions __mocks__/@carbon__charts-react.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const LineChart = jest.fn(() => null);
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { type Allergen } from '../allergies/allergies-form/allergy-form.resource';
import { AllergenType } from '../types';
enum AllergenType {
DRUG = 'DRUG',
FOOD = 'FOOD',
ENVIRONMENT = 'ENVIRONMENT',
OTHER = 'OTHER',
}

export const mockAllergyResult = {
display: 'ACE inhibitors',
Expand Down Expand Up @@ -504,7 +508,7 @@ export const mockFhirAllergyIntoleranceResponse = {
],
};

export const mockAllergens: Allergen[] = [
export const mockAllergens = [
{ uuid: '162298AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', display: 'ACE inhibitors', type: AllergenType.DRUG },
{
uuid: '162299AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { Condition } from '../conditions/conditions.resource';

export const mockFhirConditionsResponse = {
resourceType: 'Bundle',
id: 'da5b65d7-4e14-407d-9655-6207ef755b8a',
Expand Down Expand Up @@ -336,7 +334,7 @@ export const mockFhirConditionsResponse = {
],
};

export const mockConditions: Array<Condition> = [
export const mockConditions = [
{
clinicalStatus: 'active',
conceptId: '138571AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,3 @@ export const mockForms = [
lastCompleted: new Date('2022-04-08T06:21:48.000Z'),
},
];

export const mockPatientEncounters = [
{
uuid: '5859f098-45d6-4c4e-9447-53dd4032d7d7',
encounterDateTime: '2021-03-16T08:17:34.000Z',
encounterTypeUuid: '67a71486-1a54-468f-ac3e-7091a9a79584',
encounterTypeName: 'Vitals',
form: {
uuid: 'c51b0cbe-32d8-4ea5-81d2-8f3ade30c2de',
name: 'POC Vitals v1.0',
published: true,
retired: false,
encounterTypeUuid: '67a71486-1a54-468f-ac3e-7091a9a79584',
encounterTypeName: 'Vitals',
checked: true,
},
},
];
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { FHIRImmunizationBundle } from '../immunizations/immunization-domain';
import dayjs from 'dayjs';

export const mockImmunizationConfig = {
Expand Down Expand Up @@ -106,7 +105,7 @@ export const mockPatientImmunization = {
],
};

export const mockPatientImmunizationsSearchResponse: FHIRImmunizationBundle = {
export const mockPatientImmunizationsSearchResponse = {
resourceType: 'Bundle',
entry: [
{
Expand Down
19 changes: 19 additions & 0 deletions __mocks__/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export * from './allergies.mock';
export * from './appointments.mock';
export * from './chart-widgets-config.mock';
export * from './conditions.mock';
export * from './encounters.mock';
export * from './forms.mock';
export * from './generic-widgets.mock';
export * from './immunizations.mock';
export * from './location.mock';
export * from './medication.mock';
export * from './mockDeceasedPatient';
export * from './patient-flags.mock';
export * from './programs.mock';
export * from './relationships.mock';
export * from './session.mock';
export * from './visit-notes.mock';
export * from './visitQueueEntry.mock';
export * from './visits.mock';
export * from './vitals.mock';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type { QueueStatus } from '../visit/queue-entry/queue.resource';

export const mockVisitQueueEntries = {
id: 'eb8b58c1-4889-4a2b-ac7a-cedb90753349',
name: 'Triage Room',
patientUuid: 'c6e92737-a350-11eb-aa9b-0242512be084',
priority: 'Eculizumab',
priorityUuid: 'e87911cc-75b3-42b5-9d7a-aa90e480241e',
service: 'Triage Room',
status: 'Waiting' as QueueStatus,
status: 'Waiting' as 'Waiting',
statusUuid: '167407AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
visitUuid: '9fe68c98-f55c-4eb5-9dad-80cf4749755f',
queueUuid: '95ed6677-dd19-40e6-b8ad-29cfff9f0e1a',
Expand Down
File renamed without changes.
Loading

0 comments on commit 516f991

Please sign in to comment.