Skip to content

Commit

Permalink
Add approval date to unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elsaperelli committed Aug 19, 2024
1 parent a1d2d9d commit 94c06c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion service/test/services/LibraryService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,8 @@ describe('LibraryService', () => {
parameter: [
{ name: 'id', valueString: 'approve-child1' },
{ name: 'artifactAssessmentType', valueCode: 'documentation' },
{ name: 'artifactAssessmentSummary', valueString: 'Hello' }
{ name: 'artifactAssessmentSummary', valueString: 'Hello' },
{ name: 'approvalDate', valueDate: '2024-08-14T17:29:34.344Z' }
]
})
.set('content-type', 'application/fhir+json')
Expand All @@ -1126,10 +1127,12 @@ describe('LibraryService', () => {
expect(response.body.entry[0].resource.extension[0].url).toEqual(
'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment'
);
expect(response.body.entry[0].resource.approvalDate).toEqual('2024-08-14T17:29:34.344Z');
expect(response.body.entry[1].resource.date).toBeDefined();
expect(response.body.entry[1].resource.extension[1].url).toEqual(
'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment'
);
expect(response.body.entry[1].resource.approvalDate).toEqual('2024-08-14T17:29:34.344Z');
});
});

Expand Down
6 changes: 5 additions & 1 deletion service/test/services/MeasureService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,8 @@ describe('MeasureService', () => {
parameter: [
{ name: 'id', valueString: 'approve-parent' },
{ name: 'artifactAssessmentType', valueCode: 'documentation' },
{ name: 'artifactAssessmentSummary', valueString: 'Hello' }
{ name: 'artifactAssessmentSummary', valueString: 'Hello' },
{ name: 'approvalDate', valueDate: '2024-08-14T17:29:34.344Z' }
]
})
.set('content-type', 'application/fhir+json')
Expand All @@ -1158,14 +1159,17 @@ describe('MeasureService', () => {
expect(response.body.entry[0].resource.extension[0].url).toEqual(
'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment'
);
expect(response.body.entry[0].resource.approvalDate).toEqual('2024-08-14T17:29:34.344Z');
expect(response.body.entry[1].resource.date).toBeDefined();
expect(response.body.entry[1].resource.extension[1].url).toEqual(
'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment'
);
expect(response.body.entry[1].resource.approvalDate).toEqual('2024-08-14T17:29:34.344Z');
expect(response.body.entry[2].resource.date).toBeDefined();
expect(response.body.entry[2].resource.extension[1].url).toEqual(
'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment'
);
expect(response.body.entry[2].resource.approvalDate).toEqual('2024-08-14T17:29:34.344Z');
});
});

Expand Down

0 comments on commit 94c06c9

Please sign in to comment.