Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.solidscipt.zoracle.xyz/llms.txt

Use this file to discover all available pages before exploring further.

The test command transpiles your .t.ts test files into Forge-compatible Solidity tests and then runs them through Forge’s test runner. On first use it installs forge-std automatically. Use --pattern to run a single test function, which is useful for tight iteration on a failing case or for targeted fuzz runs.
solidscript test

Options

FlagDescription
-p, --pattern <pattern>Forge --match-test pattern. Only tests whose names match the pattern are executed.
--tests <dir>Directory containing .t.ts test files. Defaults to tests/contracts
--contracts <dir>Directory containing the contract source files under test. Defaults to examples
--root <dir>Forge project root where forge-std and generated test files are managed. Defaults to out/forge

Examples

# Run all tests
npx solidscript test

# Run only tests whose name matches testFuzz
npx solidscript test -p testFuzz
forge-std is installed into the Forge project root on first run. You do not need to install it separately.