You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.error('error occurred while fetching pem encoded public keys either from cache or public key urls due to %s',error.message)
returnhelpers.exportFunctions.genErrorResponse(500,'Error occurred while fetching pem encoded Public Key')
}
return[pubKey1Pem,pubKey2Pem]
}
The problematic item is the catch() clause. It returns helpers.exportFunctions.genErrorResponse(500, 'Error occurred while fetching pem encoded Public Key'), which has a problem:
helpers.exportFunctions.genErrorResponse returns an object, and this function explicitly says it should return an Array of (two) strings (tuple).
This therefore renders the test "Test Fetch Pem Encoded Public Keys -> verify for invalid pub key url throws" in signatureUtils.test.js as an invalid test since it will never throw an error. In fact the test is bogus - it doesn't really test the (mocked) return value - it tests an error that it sets up itself.
Function signatureUtils::fetchPemEncodedPublicKeys :
aio-lib-events/src/signatureUtils.js
Lines 50 to 68 in bfb5e17
The problematic item is the catch() clause. It returns
helpers.exportFunctions.genErrorResponse(500, 'Error occurred while fetching pem encoded Public Key')
, which has a problem:helpers.exportFunctions.genErrorResponse
returns an object, and this function explicitly says it should return an Array of (two) strings (tuple).This therefore renders the test "Test Fetch Pem Encoded Public Keys -> verify for invalid pub key url throws" in signatureUtils.test.js as an invalid test since it will never throw an error. In fact the test is bogus - it doesn't really test the (mocked) return value - it tests an error that it sets up itself.
The test is here:
aio-lib-events/test/signatureUtils.test.js
Lines 91 to 108 in bfb5e17
The text was updated successfully, but these errors were encountered: