Skip to content

add bankrun tests for account-data anchor example#569

Open
HkSolDev wants to merge 6 commits intosolana-developers:mainfrom
HkSolDev:fix-bankrun-test-path
Open

add bankrun tests for account-data anchor example#569
HkSolDev wants to merge 6 commits intosolana-developers:mainfrom
HkSolDev:fix-bankrun-test-path

Conversation

@HkSolDev
Copy link
Copy Markdown

Description

This PR introduces a new solana-bankrun test suite for the account-data Anchor basics example.

Previously, this example was missing bankrun tests. This new suite leverages anchor-bankrun to provide ultra-fast, lightweight testing of the CreateAddressInfo instruction, verifying that the program correctly initializes and stores state inside the Account Data.

Changes

  • Created basics/account-data/anchor/tests/bankrun.test.ts.
  • Configured local environment context with startAnchor.
  • Added test cases to verify the creation and retrieval of the AddressInfo account struct (Name, House Number, Street, and City).

Testing

  • Successfully ran pnpm ts-mocha -p ./tsconfig.json tests/bankrun.test.ts.
  • Validated that the account data is correctly populated and asserted without requiring a full LocalValidator.

@HkSolDev
Copy link
Copy Markdown
Author

@dev-jodee can you please review it

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