Moonwall is a comprehensive blockchain test framework for Substrate-based networks
pnpm -g i @moonwall/cli
Or whichever way you prefer to install via your favourite package manager
Package manager
pnpm
is required for this repo. You can install it withnpm install -g pnpm
or otherwise following their instructions.
pnpm i
to install all dependencies.pnpm build
to build the application locally.pnpm start
to check that the application runs- (In your project dir)
npm i <path_to_moonwall_repo>
to locally add moonwall to your other repo
From here you can import the items you need from moonwall packages in your code:
import { describeSuite , beforeAll, expect, ALITH_ADDRESS } from "@moonwall/cli";
import { ALITH_ADDRESS } from "@moonwall/util";
- Execute Script: Run scripts placed in your config defined script directory.
- Network Launcher & Toolbox: Launch network, access tools: tail logs, interactive tests etc.
- Test Suite Execution: Run automated tests, start network if needed.
- Artifact Downloader: Fetch artifacts (x86) from GitHub repos.
ℹ️ Use
--help
for more information about arguments for each command
-
moonwall
: If you have globally installed moonwall, here is the most minimal entrypoint -
pnpm moonwall
: This can be used if locally installed, and will launch the main menu.. -
pnpm moonwall run <ENV_NAME>
: Run a network specified in your config file. -
pnpm moonwall test <ENV_NAME>
: Start network and run tests against it. -
pnpm moonwall download <ARTIFACT NAME> <VERSION> <PATH>
: Download an artifact directly from github.
The combinations are endless, for more information you can see the pnpm docs here.