Skip to content

Commit

Permalink
tests: remove old Pocket tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Aug 18, 2022
1 parent d3592ef commit 7357dd2
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions packages/tests/src.ts/test-providers.ts
Expand Up @@ -1238,7 +1238,9 @@ describe("Test API Key Formatting", function() {
assert.equal(apiKeyObject2.applicationSecretKey, applicationSecretKey);

// Test complex API key with loadBalancer
[ true, false ].forEach((loadBalancer) => {
{
const loadBalancer = true;

const apiKeyObject = ethers.providers.PocketProvider.getApiKey({
applicationId, loadBalancer
});
Expand All @@ -1252,29 +1254,7 @@ describe("Test API Key Formatting", function() {
assert.equal(apiKeyObject2.applicationId, applicationId);
assert.equal(apiKeyObject2.applicationSecretKey, applicationSecretKey);
assert.equal(apiKeyObject2.loadBalancer, loadBalancer);
});

// Fails on invalid applicationId type
assert.throws(() => {
const apiKey = ethers.providers.PocketProvider.getApiKey({
applicationId: 1234,
applicationSecretKey: applicationSecretKey
});
console.log(apiKey);
}, (error: any) => {
return (error.argument === "applicationId" && error.reason === "applicationSecretKey requires an applicationId");
});

// Fails on invalid projectSecret type
assert.throws(() => {
const apiKey = ethers.providers.PocketProvider.getApiKey({
applicationId: applicationId,
applicationSecretKey: 1234
});
console.log(apiKey);
}, (error: any) => {
return (error.argument === "applicationSecretKey" && error.reason === "invalid applicationSecretKey");
});
}

{
const provider = new ethers.providers.PocketProvider("homestead", {
Expand Down

0 comments on commit 7357dd2

Please sign in to comment.