Skip to content
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

[account compression] Clean up tests #5847

Closed
wants to merge 5 commits into from

Conversation

ngundotra
Copy link
Contributor

It is not eminently clear that zero-length instructions work, so add a test case for this in e2e tests.

Addresses concern in #5092

@ngundotra
Copy link
Contributor Author

ngundotra commented Nov 15, 2023

@jnwng @buffalojoec @joncinque Before adding some features to SPL account compression (in follow up PRs), do you guys have any preference on how the SPL Account Compression test suite is written?

@buffalojoec
Copy link
Contributor

buffalojoec commented Nov 15, 2023

@jnwng @buffalojoec @joncinque Before adding some features to SPL account compression (in follow up PRs), do you guys have any preference on how the SPL Account Compression test suite is written?

From what I can tell all of the JS libraries do tests their own way, but we are migrating all of them to use pnpm over npm or yarn, so if you wanted to configure your package.json and test suite for that, it would be a help. Shouldn't be much of a change!

Specifically how the tests are written: I don't have any objections myself!

@buffalojoec
Copy link
Contributor

@joncinque might not be the place to discuss but this did remind me of Solana Bankrun, which we can use to test our JS libs.
https://kevinheavey.github.io/solana-bankrun/

@ngundotra ngundotra changed the title [account compression] Add tests for zero-length proof ixs [account compression] Clean up tests Nov 15, 2023
@ngundotra
Copy link
Contributor Author

Okay, I actually split up the tests into a few different spots, should run a bit faster on local now since they can be parallelized by jest. Also way easier to read now.

Should be evident from the tests/accounts/canopy.test.ts that zero length transfer works.

@joncinque
Copy link
Contributor

Do you guys have any preference on how the SPL Account Compression test suite is written?

Jest is normally the recommended test suite over mocha. And definitely use bankrun rather than spinning up a test validator to test against, if you can!

@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Nov 30, 2023
@github-actions github-actions bot closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; will be closed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants