The official Solana documentation on testing a Program via an Anchor project says:
If you prefer Rust for testing, initialize your project with the --test-template rust flag.
anchor init --test-template rust my-program
However, the official Anchor documentation doesn't say anything about the --test-template
flag of anchor init
, nor is it accepted when you try to run the anchor init --test-template rust my-program
command in CLI, with anchor-cli 0.28.0
installed.
The only note regarding the matter that I could find in the Anchor docs is the following:
Note: The Anchor workflow recommends to test your program using integration tests in a language other than Rust to make sure that bugs related to syntax misunderstandings are coverable with tests and not just replicated in tests.
How can Anchor be configured to accept tests written in Rust (and not TypeScript)?