@@ -1238,7 +1238,9 @@ describe("Test API Key Formatting", function() {
12381238 assert . equal ( apiKeyObject2 . applicationSecretKey , applicationSecretKey ) ;
12391239
12401240 // Test complex API key with loadBalancer
1241- [ true , false ] . forEach ( ( loadBalancer ) => {
1241+ {
1242+ const loadBalancer = true ;
1243+
12421244 const apiKeyObject = ethers . providers . PocketProvider . getApiKey ( {
12431245 applicationId, loadBalancer
12441246 } ) ;
@@ -1252,29 +1254,7 @@ describe("Test API Key Formatting", function() {
12521254 assert . equal ( apiKeyObject2 . applicationId , applicationId ) ;
12531255 assert . equal ( apiKeyObject2 . applicationSecretKey , applicationSecretKey ) ;
12541256 assert . equal ( apiKeyObject2 . loadBalancer , loadBalancer ) ;
1255- } ) ;
1256-
1257- // Fails on invalid applicationId type
1258- assert . throws ( ( ) => {
1259- const apiKey = ethers . providers . PocketProvider . getApiKey ( {
1260- applicationId : 1234 ,
1261- applicationSecretKey : applicationSecretKey
1262- } ) ;
1263- console . log ( apiKey ) ;
1264- } , ( error : any ) => {
1265- return ( error . argument === "applicationId" && error . reason === "applicationSecretKey requires an applicationId" ) ;
1266- } ) ;
1267-
1268- // Fails on invalid projectSecret type
1269- assert . throws ( ( ) => {
1270- const apiKey = ethers . providers . PocketProvider . getApiKey ( {
1271- applicationId : applicationId ,
1272- applicationSecretKey : 1234
1273- } ) ;
1274- console . log ( apiKey ) ;
1275- } , ( error : any ) => {
1276- return ( error . argument === "applicationSecretKey" && error . reason === "invalid applicationSecretKey" ) ;
1277- } ) ;
1257+ }
12781258
12791259 {
12801260 const provider = new ethers . providers . PocketProvider ( "homestead" , {
0 commit comments