fixing some tests.

This commit is contained in:
Jason Kulatunga 2023-08-25 15:38:50 -07:00
parent 8b33c6d34a
commit b351919096
No known key found for this signature in database
3 changed files with 11 additions and 6 deletions

View File

@ -240,9 +240,11 @@ export class MedicalSourcesConnectedComponent implements OnInit {
* @param tokenResponse
* @param env
*/
private getAccessTokenExpiration(tokenResponse: any): number
public getAccessTokenExpiration(tokenResponse: any): number
{
const now = Math.floor(Date.now() / 1000);
let expires_at = 0;
// Option 1 - using the expires_in property of the token response
if (tokenResponse.expires_in) {

View File

@ -123,8 +123,9 @@ describe('DashboardWidgetComponent', () => {
"from": "Immunization",
"where": {},
"aggregation_params":["resourceType"],
"aggregation_type":"countBy"
"aggregations":{
"count_by": "source_resource_type"
},
}
},
{
@ -136,8 +137,9 @@ describe('DashboardWidgetComponent', () => {
"from": "Claim",
"where": {},
"aggregation_params":["resourceType"],
"aggregation_type":"countBy"
"aggregations":{
"count_by": "source_resource_type"
},
}
}],
"parsing": {

View File

@ -13,8 +13,9 @@ describe('HumanNameModel', () => {
expectedHumanName.familyName = 'Windsor'
expectedHumanName.suffix = ''
expectedHumanName.use = 'maiden'
expectedHumanName.header = 'Peter, James Windsor'
// expectedHumanName.header = 'Peter, James Windsor'
expect(new HumanNameModel(fixture)).toEqual(expectedHumanName);
expect('Peter, James Windsor').toEqual(expectedHumanName.displayName);
});
});