test: account for rent collection to avoid bogus test failure
(cherry picked from commit fba0e933a4
)
This commit is contained in:
@ -1995,7 +1995,7 @@ test('transaction failure', async () => {
|
||||
url,
|
||||
{
|
||||
method: 'requestAirdrop',
|
||||
params: [account.publicKey.toBase58(), minimumAmount + 100010],
|
||||
params: [account.publicKey.toBase58(), 3 * minimumAmount],
|
||||
},
|
||||
{
|
||||
error: null,
|
||||
@ -2005,7 +2005,7 @@ test('transaction failure', async () => {
|
||||
]);
|
||||
const airdropSignature = await connection.requestAirdrop(
|
||||
account.publicKey,
|
||||
minimumAmount + 100010,
|
||||
3 * minimumAmount,
|
||||
);
|
||||
|
||||
mockConfirmTransaction(airdropSignature);
|
||||
@ -2023,12 +2023,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');
|
||||
@ -2049,7 +2049,7 @@ test('transaction failure', async () => {
|
||||
SystemProgram.createAccount({
|
||||
fromPubkey: account.publicKey,
|
||||
newAccountPubkey: newAccount.publicKey,
|
||||
lamports: 1000,
|
||||
lamports: minimumAmount,
|
||||
space: 0,
|
||||
programId: SystemProgram.programId,
|
||||
}),
|
||||
@ -2082,7 +2082,7 @@ test('transaction failure', async () => {
|
||||
SystemProgram.createAccount({
|
||||
fromPubkey: account.publicKey,
|
||||
newAccountPubkey: newAccount.publicKey,
|
||||
lamports: 10,
|
||||
lamports: minimumAmount + 1,
|
||||
space: 0,
|
||||
programId: SystemProgram.programId,
|
||||
}),
|
||||
|
Reference in New Issue
Block a user