Skip to content

add optimized bankrun for close account#571

Open
HkSolDev wants to merge 7 commits intosolana-developers:mainfrom
HkSolDev:fix/close-account-bankrun-tests
Open

add optimized bankrun for close account#571
HkSolDev wants to merge 7 commits intosolana-developers:mainfrom
HkSolDev:fix/close-account-bankrun-tests

Conversation

@HkSolDev
Copy link
Copy Markdown

Description

This PR adds the solana-bankrun testing suite to the close-account program to run lightning-fast simulations without a local validator.

Changes Included:

  • tests/bankrun.test.ts:
    • Added test to verify createUser properly initializes the UserState PDA account.
    • Added test to verify closeUser successfully deletes the account data and reclaims rent.
  • Installed anchor-bankrun and solana-bankrun dependencies.

How to run:

npx ts-mocha -p ./tsconfig.json tests/bankrun.test.ts

Add two test all pass 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant