Practical overview
When it fits
Use the documentation to understand or maintain a Bankrun-based local testing setup. For a new framework choice, account for the repository’s deprecation notice and its recommendation to use LiteSVM.
Who it is for
- Developers writing Node.js tests for Solana programs
- Teams testing transaction outcomes, account data or time-dependent behavior in a local bank environment
Documented uses
- Submit transactions through a BanksClient and inspect outcomes such as account balances.
- Set account data dynamically as part of a test.
- Move bank state backward or forward to test time-dependent behavior.
Requirements & limits
The repository specifies the Apache-2.0 license. Its installation example uses Yarn.
- Bankrun uses a lightweight BanksServer with a BanksClient rather than describing a remote RPC testing workflow.
- The project is deprecated; the repository recommends LiteSVM, but provides no migration steps or compatibility guarantee in the cited material.
- The README warns that concurrent Jest test files can occasionally fail and suggests running them with
--runInBand.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up the documented Bankrun test example
Install Bankrun and prepare a Node.js test that submits a transfer and checks the resulting balance.
Before you start
- A Node.js project
- Yarn
- The solana-bankrun package
- The @solana/web3.js package
- A test runner such as Jest; the README says other test runners can be used
Steps
Add Bankrun to the project with
yarn add solana-bankrun.Import
startfromsolana-bankrunand the transaction and system-program types from@solana/web3.jsin a test file.Start a context with
start([], []), then use its BanksClient, payer and last blockhash to construct and submit the documented lamport transfer.Read the receiver’s balance through the BanksClient and assert that it equals the transferred amount.
Expected outcome
A test structured like the README example, checking a transaction’s resulting receiver balance in Bankrun’s local bank environment.
Guide limitations
- The repository marks Bankrun deprecated and recommends LiteSVM instead.
- The README notes occasional failures with concurrent Jest test files and suggests
--runInBand. - This setup recipe does not demonstrate loading or testing a user-provided Solana program.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- kevinheavey/solana-bankrun · Official homepage title · retained in its source language
Related options
LiteSVM — The Bankrun repository’s recommended successor for Solana program testing. The cited material does not document migration steps or verify compatibility.
Explore project →
