Skip to content

Commit

Permalink
refactor(blockfrost): remove any typecasts
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyslbw committed Sep 28, 2021
1 parent c82f304 commit f5fa467
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/blockfrost/test/blockfrostProvider.test.ts
Expand Up @@ -37,8 +37,8 @@ describe('blockfrostProvider', () => {
} as Responses['network'];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
BlockFrostAPI.prototype.epochsLatest = jest.fn().mockResolvedValue(mockedEpochsLatestResponse) as any;
BlockFrostAPI.prototype.network = jest.fn().mockResolvedValue(mockedNetworkResponse) as any;
BlockFrostAPI.prototype.epochsLatest = jest.fn().mockResolvedValue(mockedEpochsLatestResponse);
BlockFrostAPI.prototype.network = jest.fn().mockResolvedValue(mockedNetworkResponse);

const client = blockfrostProvider({ projectId: apiKey, isTestnet: true });
const response = await client.networkInfo();
Expand Down Expand Up @@ -80,9 +80,9 @@ describe('blockfrostProvider', () => {
] as Responses['pool_list'];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
BlockFrostAPI.prototype.pools = jest.fn().mockResolvedValue(mockedActivePoolsResponse) as any;
BlockFrostAPI.prototype.poolsRetired = jest.fn().mockResolvedValue(mockedRetiredPoolsResponse) as any;
BlockFrostAPI.prototype.poolsRetiring = jest.fn().mockResolvedValue(mockedRetiringPoolsResponse) as any;
BlockFrostAPI.prototype.pools = jest.fn().mockResolvedValue(mockedActivePoolsResponse);
BlockFrostAPI.prototype.poolsRetired = jest.fn().mockResolvedValue(mockedRetiredPoolsResponse);
BlockFrostAPI.prototype.poolsRetiring = jest.fn().mockResolvedValue(mockedRetiringPoolsResponse);

const client = blockfrostProvider({ projectId: apiKey, isTestnet: true });
const response = await client.stakePoolStats();
Expand Down Expand Up @@ -427,7 +427,7 @@ describe('blockfrostProvider', () => {
confirmations: 0
} as Responses['block_content'];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
BlockFrostAPI.prototype.blocksLatest = jest.fn().mockResolvedValue(mockedResponse) as any;
BlockFrostAPI.prototype.blocksLatest = jest.fn().mockResolvedValue(mockedResponse);

const client = blockfrostProvider({ projectId: apiKey, isTestnet: true });
const response = await client.ledgerTip();
Expand Down

0 comments on commit f5fa467

Please sign in to comment.