chore: install openagent opencode
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
35
.opencode/context/development/ai/mastra-ai/guides/testing.md
Normal file
35
.opencode/context/development/ai/mastra-ai/guides/testing.md
Normal file
@@ -0,0 +1,35 @@
|
||||
<!-- Context: development/testing | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
|
||||
|
||||
# Guide: Testing Mastra
|
||||
|
||||
**Purpose**: How to run and validate Mastra components in this project.
|
||||
|
||||
**Last Updated**: 2026-01-09
|
||||
|
||||
---
|
||||
|
||||
## Core Idea
|
||||
Testing in this project is divided into tool-level tests and full workflow integration tests. Use the provided bun --bun scripts for rapid validation.
|
||||
|
||||
## Key Points
|
||||
- **Tool Tests**: Validate individual tools in isolation (e.g., `bun --bun run test:playbook`).
|
||||
- **Workflow Tests**: Run full end-to-end scenarios (e.g., `bun --bun run test:workflow`).
|
||||
- **Baseline Tests**: Compare current performance against a known baseline (`bun --bun run test:baseline`).
|
||||
- **Observability**: Use `bun --bun run traces` after tests to inspect the execution details in the database.
|
||||
|
||||
## Quick Example
|
||||
```bash
|
||||
# Test a specific tool
|
||||
bun --bun run test:calculator
|
||||
|
||||
# Run full validity workflow
|
||||
bun --bun run validity:workflow
|
||||
|
||||
# View results of the last run
|
||||
bun --bun run traces
|
||||
```
|
||||
|
||||
**Reference**: `package.json` scripts, `scripts/` directory
|
||||
**Related**:
|
||||
- concepts/core.md
|
||||
- lookup/mastra-config.md
|
||||
Reference in New Issue
Block a user