From fba0e933a47549f475826560b4bd64b9eefcbffa Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 25 Jan 2021 17:00:25 -0800 Subject: [PATCH] test: account for rent collection to avoid bogus test failure --- web3.js/test/connection.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web3.js/test/connection.test.js b/web3.js/test/connection.test.js index ab944bc056..c5eb6d9dd5 100644 --- a/web3.js/test/connection.test.js +++ b/web3.js/test/connection.test.js @@ -2012,7 +2012,7 @@ test('transaction failure', async () => { url, { method: 'requestAirdrop', - params: [account.publicKey.toBase58(), minimumAmount + 100010], + params: [account.publicKey.toBase58(), 3 * minimumAmount], }, { error: null, @@ -2022,7 +2022,7 @@ test('transaction failure', async () => { ]); const airdropSignature = await connection.requestAirdrop( account.publicKey, - minimumAmount + 100010, + 3 * minimumAmount, ); mockConfirmTransaction(airdropSignature); @@ -2040,12 +2040,12 @@ test('transaction failure', async () => { context: { slot: 11, }, - value: minimumAmount + 100010, + value: 3 * minimumAmount, }, }, ]); expect(await connection.getBalance(account.publicKey)).toBe( - minimumAmount + 100010, + 3 * minimumAmount, ); mockGetRecentBlockhash('max'); @@ -2066,7 +2066,7 @@ test('transaction failure', async () => { SystemProgram.createAccount({ fromPubkey: account.publicKey, newAccountPubkey: newAccount.publicKey, - lamports: 1000, + lamports: minimumAmount, space: 0, programId: SystemProgram.programId, }), @@ -2099,7 +2099,7 @@ test('transaction failure', async () => { SystemProgram.createAccount({ fromPubkey: account.publicKey, newAccountPubkey: newAccount.publicKey, - lamports: 10, + lamports: minimumAmount + 1, space: 0, programId: SystemProgram.programId, }),