test(token-extensions): re-enable mint-close-authority, transfer-fee, non-transferable native with LiteSVM tests#51
Merged
Conversation
… examples mint-close-authority, transfer-fee, and non-transferable native were excluded in .ghaignore: their only tests were TypeScript suites that import from `node:test` but run under `ts-mocha`, executing zero tests (false green), so they had no real coverage. Add LiteSVM Rust integration tests (same pattern as the multiple-extensions and default-account-state examples) asserting each Token-2022 mint is created with the expected extension: - mint-close-authority: MintCloseAuthority present with the right authority - non-transferable: NonTransferable present - transfer-fee: TransferFeeConfig present with the expected authorities and the 10% / 5-token newer fee the program sets Remove the false-green TypeScript suites and their JS tooling, rewire build-and-test to just build the program .so into tests/fixtures (consumed by the LiteSVM cargo test), and drop all three from .github/.ghaignore so CI builds and tests them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #50 (this commit was pushed just after #50 merged, so it didn't make it in).
Summary
Three native Token-2022 examples were excluded in
.github/.ghaignore: their only tests were TypeScript suites thatimport { test } from "node:test"but run underts-mocha, so mocha discovered zero tests, printed "0 passing", and exited 0 (false green) — they had no real coverage.Add LiteSVM Rust integration tests (same pattern as the
multiple-extensions/default-account-stateexamples merged in #50), asserting each Token-2022 mint is created with the expected extension:MintCloseAuthoritypresent, pointing at the expected authority.NonTransferablepresent.TransferFeeConfigpresent, with the expected config/withdraw authorities and the 10% / 5-token newer fee the program sets.Also:
ts-mocha,mocha,chai,solana-bankrun, etc.) +tsconfig.json.build-and-testto just build the program.sointotests/fixtures/(consumed by the LiteSVMcargo test); empty lockfiles keeppnpm install --frozen-lockfilepassing..github/.ghaignoreso CI builds and tests them.All three were built (
cargo build-sbf) and run (cargo test) locally against the CI toolchain (Solana 3.1.14 / platform-tools v1.52) and passcargo fmt --check+cargo clippy -D warnings. LiteSVM bundles the SPL Token-2022 program, so no new fixtures are committed.https://claude.ai/code/session_013dpnF6uSGWXjkJJZseqzcP
Generated by Claude Code