From 5848e7bfecfb7fd4b38beaa39efbe663d600bf67 Mon Sep 17 00:00:00 2001 From: steveluscher Date: Tue, 21 Jun 2022 10:13:32 -0700 Subject: [PATCH] test: our tests don't understand this fancy ES syntax --- web3.js/test/connection.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web3.js/test/connection.test.ts b/web3.js/test/connection.test.ts index dd4d653857933c..b796b2a29f8bca 100644 --- a/web3.js/test/connection.test.ts +++ b/web3.js/test/connection.test.ts @@ -2197,7 +2197,7 @@ describe('Connection', function () { expect(nullResponse).to.be.null; }); - it('get transactions', async () => { + it('get transactions', async function () { await mockRpcResponse({ method: 'getSlot', params: [], @@ -2325,8 +2325,11 @@ describe('Connection', function () { }, ], }); - const result = await connection.getTransactions([transaction]); - expect(result[0]?.transaction.message.isAccountSigner(0)).to.be.true; + const [firstResult] = await connection.getTransactions([transaction]); + if (firstResult == null) { + expect.fail('Expected `getTransactions()` to return one result'); + } + expect(firstResult.transaction.message.isAccountSigner(0)).to.be.true; }); if (mockServer) {