testing-core-processors

Installation
SKILL.md

Testing Core Error Processors

How to write integration tests for error processors in packages/core/src/processors/.

Prerequisites

  • Build core before running tests: pnpm build:core (from repo root)
  • If focused vitest runs fail to resolve @internal/test-utils/setup, the build step was skipped

Mock Model Pattern

Use MockLanguageModelV2 from @internal/ai-sdk-v5/test to simulate API errors and verify retry behavior.

import { APICallError } from '@internal/ai-sdk-v5';
import { convertArrayToReadableStream, MockLanguageModelV2 } from '@internal/ai-sdk-v5/test';
Installs
3
GitHub Stars
27.2K
First Seen
5 days ago
testing-core-processors — mastra-ai/mastra