tests: remove old Pocket tests
This commit is contained in:
parent
d3592efc1d
commit
7357dd24ea
@ -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
|
||||
});
|
||||
@ -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", {
|
||||
|
Loading…
Reference in New Issue
Block a user