Testing · mastra-ai/mastra
Expand test coverage for Mastra agent utilities
Adds unit tests for isSupportedLanguageModel and resolveThreadIdFromArgs in Mastra core. Consolidates existing tests for tryGenerateWithJsonFallback.
The problem
Agent utilities needed additional unit coverage for language-model support checks and thread ID resolution. Existing JSON fallback tests covered successful generation and retries after errors or missing structured output.
The approach
Extends the agent utility test file to include isSupportedLanguageModel and resolveThreadIdFromArgs alongside tryGenerateWithJsonFallback. The PR description states that existing fallback tests are consolidated; the truncated diff does not expose the new assertions. Adds a patch changeset documenting the test coverage work.
What changed
Expands and reorganizes the agent utility test suite without changing production utility code.
- typescript
- vitest
- unit-tests
- agent
- structured-output