Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions basics/checking-accounts/anchor/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ wallet = "~/.config/solana/id.json"

[scripts]
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
litesvm-test = "node --test tests/litesvm.test.ts"
Copy link
Collaborator

@Perelyn-sama Perelyn-sama Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the test script should work for tests/litesvm.test.ts too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review 🙌🏼.

Yes, litesvm-test is a separate script, but it uses the Node test runner, not Mocha.
Running anchor test will execute both test suites (litesvm-test.ts and test.ts).
Running anchor run litesvm-test will execute only the LiteSVM tests using the Node test runner.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if litesvm.test.ts is the only test, what's the point of having two scripts that run it.

just the test script should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. To clarify: there are two different test files at tests directory with different purposes.

That’s why both scripts currently exist.

If you prefer combining or simplifying them, I can update the PR 🙌🏼

5 changes: 2 additions & 3 deletions basics/checking-accounts/anchor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"type": "module",
"dependencies": {
"@coral-xyz/anchor": "0.32.1",
"@solana/web3.js": "^1.95.2"
"@solana/web3.js": "^1.98.4",
"litesvm": "^0.4.0"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"anchor-bankrun": "^0.4.0",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"solana-bankrun": "^0.3.0",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5"
}
Expand Down
Loading