You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,21 +14,27 @@ See [CHANGELOG.md](./CHANGELOG.md) for release history. This file had no changel
14
14
- Each example lives at `category/example-name/<framework>/`, e.g. `basics/counter/anchor/`.
15
15
- Supported frameworks: `anchor`, `quasar`, `pinocchio`, `native`, `asm`. Use the existing layout as a reference.
16
16
- 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/`.
18
18
19
19
## Tooling
20
20
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.
22
22
-**Formatter / linter:**[Biome](https://biomejs.dev/). Run `pnpm fix` from the repo root before submitting a PR.
23
23
24
24
## Testing
25
25
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`.
27
33
28
34
### Native and Pinocchio
29
35
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).
0 commit comments