Source:
examples/agent-with-testsOverview
This template demonstrates how to write both deterministic and non-deterministic tests for aixyz agents usingbun:test. It covers unit testing agent configuration, tool registration, and end-to-end agent execution.
Project Structure
Test Pattern
Key Features
- Deterministic tests — Validate agent type, tool registration, and config without API calls
- Non-deterministic tests — Test actual agent execution with
test.skipIffor missing API keys - Environment loading —
loadEnv()fromaixyz/testloads.envfiles for test runs - CI-friendly — Deterministic tests always run; non-deterministic tests skip gracefully