Skip to content

Commit 2a5c909

Browse files
authored
test: cleanup (#1539)
1 parent dc614af commit 2a5c909

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

packages/rpc-core/src/rpc-methods/__tests__/get-fee-for-message-test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ describe('getFeeForMessage', () => {
7777
expect.assertions(1);
7878
const latestBlockhash = await rpc.getLatestBlockhash().send();
7979
const message = getMockTransactionMessage(latestBlockhash.value.blockhash);
80-
console.log('Printing mock message', message);
8180
const result = await rpc.getFeeForMessage(message, { commitment }).send();
8281
expect(result).toMatchObject({
8382
context: {

packages/rpc-core/src/rpc-methods/__tests__/get-signature-statuses-test.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ describe('getSignatureStatuses', () => {
3434
});
3535

3636
describe('when called with no transaction signature provided', () => {
37-
it('throws an error', async () => {
37+
it('returns an empty list', async () => {
3838
expect.assertions(1);
39-
const signatureStatusPromise = rpc
40-
.getSignatureStatuses(['invalid_signature' as TransactionSignature])
41-
.send();
42-
await expect(signatureStatusPromise).rejects.toMatchObject({
43-
code: -32602 satisfies (typeof SolanaJsonRpcErrorCode)['JSON_RPC_INVALID_PARAMS'],
44-
message: expect.any(String),
45-
name: 'SolanaJsonRpcError',
39+
const signatureStatusPromise = rpc.getSignatureStatuses([]).send();
40+
await expect(signatureStatusPromise).resolves.toMatchObject({
41+
context: {
42+
slot: expect.any(BigInt),
43+
},
44+
value: [],
4645
});
4746
});
4847
});

0 commit comments

Comments
 (0)