-
Notifications
You must be signed in to change notification settings - Fork 490
Add LiteSVM Tests for Checking Accounts (Anchor) #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add LiteSVM Tests for Checking Accounts (Anchor) #467
Conversation
- Change module system to 'nodenext' - Update target to 'es2020' - Enable JSON module resolution
- Upgrade @solana/web3.js to version 1.98.4 - Add litesvm as a new dependency with version 0.4.0 - Update pnpm-lock.yaml to reflect changes in dependency versions and resolutions
- Introduce a new test script for LiteSVM in the Anchor.toml configuration file.
- Remove anchor-bankrun and solana-bankrun dependencies from package.json and pnpm-lock.yaml. - Delete the bankrun.test.ts file as it is no longer needed, It's deprecated.
|
|
||
| [scripts] | ||
| test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" | ||
| litesvm-test = "node --test tests/litesvm.test.ts" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
Thanks for this and the other PR @sol-warrior , clean up the scripts and we'll run the workflows |
This PR modernizes the
checking-accounts Anchor exampleby replacing deprecated Bankrun tests with a new LiteSVM test suite and aligning the project with current Solana testing practices as @Perelyn-sama mentioned in prev PR , bankrun is deprecated.Changes Included
Anchor.toml.Request
@jacobcreech When you have a moment, I’d appreciate your review on this update.
Any suggestions or adjustments are most welcome — I’m happy to refine anything as needed.
Thank you for your time and support 🙌🏼