fix: fix TypeError when confirmed block is not found (#13264)

This commit is contained in:
Justin Starry
2020-10-29 11:23:07 +08:00
committed by GitHub
parent 781b92a8c0
commit bc16b58d75
2 changed files with 8 additions and 5 deletions

View File

@ -1120,13 +1120,15 @@ test('get confirmed block', async () => {
params: [Number.MAX_SAFE_INTEGER],
},
{
error: null,
error: {
message: `Block not available for slot ${Number.MAX_SAFE_INTEGER}`,
},
result: null,
},
]);
await expect(
connection.getConfirmedBlock(Number.MAX_SAFE_INTEGER),
).rejects.toThrow();
).rejects.toThrow(`Block not available for slot ${Number.MAX_SAFE_INTEGER}`);
});
test('get recent blockhash', async () => {