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,
|
url,
|
||||||
{
|
{
|
||||||
method: 'requestAirdrop',
|
method: 'requestAirdrop',
|
||||||
params: [account.publicKey.toBase58(), minimumAmount + 100010],
|
params: [account.publicKey.toBase58(), 3 * minimumAmount],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
error: null,
|
error: null,
|
||||||
|
@ -2022,7 +2022,7 @@ test('transaction failure', async () => {
|
||||||
]);
|
]);
|
||||||
const airdropSignature = await connection.requestAirdrop(
|
const airdropSignature = await connection.requestAirdrop(
|
||||||
account.publicKey,
|
account.publicKey,
|
||||||
minimumAmount + 100010,
|
3 * minimumAmount,
|
||||||
);
|
);
|
||||||
|
|
||||||
mockConfirmTransaction(airdropSignature);
|
mockConfirmTransaction(airdropSignature);
|
||||||
|
@ -2040,12 +2040,12 @@ test('transaction failure', async () => {
|
||||||
context: {
|
context: {
|
||||||
slot: 11,
|
slot: 11,
|
||||||
},
|
},
|
||||||
value: minimumAmount + 100010,
|
value: 3 * minimumAmount,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(await connection.getBalance(account.publicKey)).toBe(
|
expect(await connection.getBalance(account.publicKey)).toBe(
|
||||||
minimumAmount + 100010,
|
3 * minimumAmount,
|
||||||
);
|
);
|
||||||
|
|
||||||
mockGetRecentBlockhash('max');
|
mockGetRecentBlockhash('max');
|
||||||
|
@ -2066,7 +2066,7 @@ test('transaction failure', async () => {
|
||||||
SystemProgram.createAccount({
|
SystemProgram.createAccount({
|
||||||
fromPubkey: account.publicKey,
|
fromPubkey: account.publicKey,
|
||||||
newAccountPubkey: newAccount.publicKey,
|
newAccountPubkey: newAccount.publicKey,
|
||||||
lamports: 1000,
|
lamports: minimumAmount,
|
||||||
space: 0,
|
space: 0,
|
||||||
programId: SystemProgram.programId,
|
programId: SystemProgram.programId,
|
||||||
}),
|
}),
|
||||||
|
@ -2099,7 +2099,7 @@ test('transaction failure', async () => {
|
||||||
SystemProgram.createAccount({
|
SystemProgram.createAccount({
|
||||||
fromPubkey: account.publicKey,
|
fromPubkey: account.publicKey,
|
||||||
newAccountPubkey: newAccount.publicKey,
|
newAccountPubkey: newAccount.publicKey,
|
||||||
lamports: 10,
|
lamports: minimumAmount + 1,
|
||||||
space: 0,
|
space: 0,
|
||||||
programId: SystemProgram.programId,
|
programId: SystemProgram.programId,
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue