AI Sdk Testing

Test code that uses the Vercel AI SDK (generateText, streamText, generateObject, streamObject) without calling real LLM APIs. Uses MockLanguageModelV3, MockEmbeddingModelV3, simulateReadableStream, and fetchMock patterns. Use when writing tests for any code that imports from 'ai', when /nightshift, /swarm, or /ralph-tdd encounter AI SDK usage, or when testing streaming responses.

jonmumm 07dbf79 13.6 KB Updated

File contents

jonmumm/skills/tree/main/ai-sdk-testing commit 07dbf793ac

Frequently asked questions

npx skillmds@latest add jonmumm/ai-sdk-testing