w3m test
Run contract and TypeScript tests for your project.
w3m testDoes not require authentication.
Options
| Option | Description |
|---|---|
--contracts | Run only contract tests (forge test) |
--ts | Run only TypeScript tests (vitest) |
-v, --verbose | Show verbose test output |
What It Does
By default, w3m test runs both contract tests and TypeScript tests. Run them individually with --contracts or --ts.
Contract Tests (Foundry)
If contracts/foundry.toml exists, runs forge test. In verbose mode (-v), passes -vvv to forge for detailed trace output.
TypeScript Tests (Vitest)
If a Vitest config is found in the project root or web/ directory, runs npx vitest run.
Test Results
After all suites complete, the CLI displays a summary:
Test Results
────────────────────────────────────
Contracts (forge): PASS
TypeScript (vitest): PASSIf any suite fails, the CLI exits with a non-zero exit code.
If no test suites are found, the CLI displays “No test suites found.” and exits successfully.
Examples
# Run all tests
w3m test
# Run only contract tests
w3m test --contracts
# Run only TypeScript tests
w3m test --ts
# Verbose output
w3m test -v