test: account for rent collection to avoid bogus test failure
This commit is contained in:
parent
fd06c1f8fa
commit
fba0e933a4
|
@ -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,
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue