Skip to content

test(token-extensions): re-enable mint-close-authority, transfer-fee, non-transferable native with LiteSVM tests#51

Merged
mikemaccana merged 1 commit into
mainfrom
claude/native-token-ext-litesvm
Jun 5, 2026
Merged

test(token-extensions): re-enable mint-close-authority, transfer-fee, non-transferable native with LiteSVM tests#51
mikemaccana merged 1 commit into
mainfrom
claude/native-token-ext-litesvm

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

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 that import { test } from "node:test" but run under ts-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-state examples merged in #50), asserting each Token-2022 mint is created with the expected extension:

  • mint-close-authorityMintCloseAuthority present, pointing at the expected authority.
  • non-transferableNonTransferable present.
  • transfer-feeTransferFeeConfig present, with the expected config/withdraw authorities and the 10% / 5-token newer fee the program sets.

Also:

  • Remove the false-green TypeScript suites and their JS tooling (ts-mocha, mocha, chai, solana-bankrun, etc.) + tsconfig.json.
  • Rewire each build-and-test to just build the program .so into tests/fixtures/ (consumed by the LiteSVM cargo test); empty lockfiles keep pnpm install --frozen-lockfile passing.
  • Drop all three from .github/.ghaignore so 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 pass cargo 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

… 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.
@mikemaccana mikemaccana merged commit 8d2a58c into main Jun 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants