Skip to content

Commit 1413a88

Browse files
committed
docs: correct stale testing instructions in CONTRIBUTING
- Tests run via the framework command (anchor test / cargo test / quasar test), not `pnpm test`; most example dirs have no package.json and the root has no test script. - Native/Pinocchio/ASM tests are Rust + LiteSVM exclusively; the web3.js v1 / solana-bankrun TS suites were removed (per CHANGELOG). The only remaining web3.js v1 is in two wallet-adapter frontend demo apps under tokens/token-extensions/, which the ecosystem still requires. Fix the Project structure note to match.
1 parent f58935b commit 1413a88

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,27 @@ See [CHANGELOG.md](./CHANGELOG.md) for release history. This file had no changel
1414
- Each example lives at `category/example-name/<framework>/`, e.g. `basics/counter/anchor/`.
1515
- Supported frameworks: `anchor`, `quasar`, `pinocchio`, `native`, `asm`. Use the existing layout as a reference.
1616
- Anchor and Quasar programs usually keep Rust tests under `programs/<name>/tests/`.
17-
- Native and Pinocchio TypeScript tests (where present) live in a `tests/` directory next to the program.
17+
- Native and Pinocchio tests are Rust + LiteSVM, kept under `program/tests/`.
1818

1919
## Tooling
2020

21-
- **Package manager:** `pnpm`. Commit `pnpm-lock.yaml`. Do not use yarn or npm here.
21+
- **Package manager:** `pnpm`. Commit `pnpm-lock.yaml`. Do not use yarn or npm here. `pnpm` is used for repo-wide tooling (formatting, linting, git hooks) and for examples with JavaScript clients, not for running an example's tests.
2222
- **Formatter / linter:** [Biome](https://biomejs.dev/). Run `pnpm fix` from the repo root before submitting a PR.
2323

2424
## Testing
2525

26-
Run `pnpm test` from `category/example/anchor/` or `category/example/quasar/`. For existing test patterns follow `basics/counter/anchor/programs/counter_anchor/tests/test_counter.rs`.
26+
Run an example's tests with the command for its framework, from the framework directory (e.g. `basics/counter/anchor/`):
27+
28+
- **Anchor:** `anchor test` (runs `cargo test`, per the `[scripts]` table in `Anchor.toml`).
29+
- **Quasar:** `quasar test`.
30+
- **Native / Pinocchio:** `cargo test --manifest-path=./program/Cargo.toml` (build first with `cargo build-sbf --manifest-path=./program/Cargo.toml`).
31+
32+
For an existing test pattern to follow, see `basics/counter/anchor/programs/counter_anchor/tests/test_counter.rs`.
2733

2834
### Native and Pinocchio
2935

30-
- Prefer LiteSVM for new tests.
31-
- Some older Native examples still use `@solana/web3.js` v1 or `solana-bankrun`; do not copy that stack for new work. Migrate toward LiteSVM + Solana Kit when touching those files.
36+
- Use LiteSVM for tests. Native, Pinocchio, and ASM examples are tested exclusively with Rust + LiteSVM; the old `@solana/web3.js` v1 / `solana-bankrun` / ts-mocha TypeScript suites were removed (see [CHANGELOG.md](./CHANGELOG.md)).
37+
- The only remaining `@solana/web3.js` v1 usage is in a couple of wallet-adapter frontend demo apps under `tokens/token-extensions/` (the wallet-adapter ecosystem still depends on it). Don't introduce it in program tests or new client code — use Solana Kit, preferably via [Kite](https://github.com/helius-labs/kite).
3238

3339
### ASM
3440

0 commit comments

Comments
 (0)