Skip to content

Commit 8143091

Browse files
authored
feat: Add LiteSVM tests for the Transfer-SOL anchor program (#482)
* feat: add litesvm test for transfer-sol anchor program * Updated package.json to include litesvm dependency. * Modified tsconfig.json to use 'nodenext' module. * Added litesvm test cases for transferring SOL using both CPI and program calls. * refactor: update transfer-sol tests for improved clarity and functionality * Renamed test suite to "Anchor: Transfer SOL" for better context. * Simplified recipient and payer account generation in tests. * Replaced balance checks with assertions for clarity. * Removed unused getBalances function to streamline the test code. * chore: remove deprecated bankrun test file and its related dependencies
1 parent 4edfea4 commit 8143091

File tree

6 files changed

+215
-245
lines changed

6 files changed

+215
-245
lines changed

basics/transfer-sol/anchor/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
"type": "module",
33
"dependencies": {
44
"@coral-xyz/anchor": "0.32.1",
5-
"@solana/web3.js": "^1.95.2"
5+
"@solana/web3.js": "^1.95.2",
6+
"litesvm": "^0.4.0"
67
},
78
"devDependencies": {
89
"@types/bn.js": "^5.1.0",
910
"@types/chai": "^4.3.0",
1011
"@types/mocha": "^9.0.0",
11-
"anchor-bankrun": "^0.4.0",
1212
"chai": "^4.3.4",
1313
"mocha": "^9.0.3",
14-
"solana-bankrun": "^0.3.0",
1514
"ts-mocha": "^10.0.0",
1615
"typescript": "^4.3.5"
1716
}

basics/transfer-sol/anchor/pnpm-lock.yaml

Lines changed: 83 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

basics/transfer-sol/anchor/tests/bankrun.test.ts

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)