This document describes how to run Hugind tests locally and how they map to CI.
- Rust toolchain (stable)
- Node.js 20+ and npm
- C/C++ toolchain for
llama-cpp-ffi(clang/cmake on macOS/Linux)
From repository root:
cargo test --all-targets
npm --prefix agent/cli testThese are the same logical checks as .github/workflows/ci.yml:
- Rust job:
cargo test --all-targets - Agent CLI job:
npm ci && npm testinagent/cli
Rust compile-only check:
cargo check --all-targetsTargeted Rust module tests:
cargo test --lib core::wasm::runtime::tests -- --nocapture
cargo test --lib core::js::capabilities::net::tests -- --nocapture
cargo test --lib core::js::capabilities::shell::tests -- --nocaptureCLI-only tests:
npm --prefix agent/cli run test:unit
npm --prefix agent/cli run test:wasm- On macOS, some shell tests are intentionally platform-gated because
sandbox-execbehavior differs from Linux. - The repo includes a root
build.rsthat linkslibcommon.afromllama-cpp-ffibuild output so tests link correctly with the current Git binding.