Skip to content

Commit

Permalink
Added goerli to AlchemyProvider tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 5, 2020
1 parent dc48bfb commit ab7c781
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions packages/tests/src.ts/test-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,22 +421,12 @@ function testProvider(providerName: string, networkName: string) {
if (networkName === "default") {
if (providerName === "getDefaultProvider") {
provider = ethers.getDefaultProvider();
} else if (providerName === "Web3Provider") {
//let infuraUrl = (new ethers.providers.InfuraProvider()).connection.url;
//provider = new ethers.providers.Web3Provider(new Web3HttpProvider(infuraUrl));
//throw new Error("skipping Web3 tests; archos error on npm install");
return
} else {
provider = new (<any>(ethers.providers))[providerName]();
}
} else {
if (providerName === "getDefaultProvider") {
provider = ethers.getDefaultProvider(networkName);
} else if (providerName === "Web3Provider") {
//let infuraUrl = (new ethers.providers.InfuraProvider(networkName)).connection.url;
//provider = new ethers.providers.Web3Provider(new Web3HttpProvider(infuraUrl), networkName);
//throw new Error("skipping Web3 tests; archos error on npm install");
return;
} else {
provider = new (<any>(ethers.providers))[providerName](networkName);
}
Expand Down Expand Up @@ -594,9 +584,12 @@ function testProvider(providerName: string, networkName: string) {
["getDefaultProvider", "AlchemyProvider", "CloudflareProvider", "InfuraProvider", "EtherscanProvider", "NodesmithProvider", "Web3Provider"].forEach(function(providerName) {
if (providerName === "NodesmithProvider") { return; }
if (providerName === "CloudflareProvider") { return; }
if (providerName === "Web3Provider") { return; }

if ((networkName !== "homestead" && networkName !== "default") && providerName === "CloudflareProvider") {
return;
}

if (networkName === "goerli" && providerName === "AlchemyProvider") { return; }
if ((networkName !== "homestead" && networkName !== "default") && providerName === "CloudflareProvider") { return; }
testProvider(providerName, networkName);
});
});
Expand Down

0 comments on commit ab7c781

Please sign in to comment.