In order to run the default Anchor project test file, which is written in TypeScript, you will need Node.js and Yarn. By default, when you create a new Anchor project using theDocumentation Index
Fetch the complete documentation index at: https://docs.soo.network/llms.txt
Use this file to discover all available pages before exploring further.
anchor init command, it generates a TypeScript-based test suite. Alternatively, if you prefer a Rust-based test setup, you can specify it during initialization with anchor init --test-template rust.
Node.js Installation
The recommended method for installing Node.js is by using the Node Version Manager (nvm). This allows you to manage different Node.js versions easily, which is especially helpful when working on multiple projects with different Node.js version requirements.-
Install nvm by running the following command in your terminal:
- After the installation, restart your terminal for the changes to take effect.
-
Verify that
nvmwas installed correctly by running: -
Once
nvmis confirmed to be installed, use it to install the latest version of Node.js by running: -
Verify the Node.js installation by checking the version:
-
You should see output similar to: