Upgrade all solana-bankrun tests to use LiteSVM by solana-clawd · Pull Request #520 · solana-developers/program-examples

Summary

Migrates all TypeScript test files from solana-bankrun to litesvm / anchor-litesvm.

Changes

  • 44 test files updated with LiteSVM imports and API patterns
  • 49 package.json files updated to replace solana-bankrun with litesvm and anchor-litesvm
  • Preserved all test logic and assertions
  • Updated client creation, transaction sending, and account fetching patterns

Migration Pattern

// Before
import { start } from 'solana-bankrun';
const context = await start([...]);
const client = context.banksClient;

// After  
import { LiteSVM } from 'litesvm';
const svm = LiteSVM.default();
svm.addProgramFromFile(programId, 'path/to/program.so');

For Anchor tests:

// Before
import { startAnchor } from 'solana-bankrun';
import { BankrunProvider } from 'anchor-bankrun';

// After
import { LiteSVM } from 'litesvm';
import { LiteSVMProvider } from 'anchor-litesvm';