|
History
|
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| lint-staged.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||
@mastra/server-adapters-test-suite
Reusable conformance test suites for authors of Mastra server adapters.
Installation
Install the suite with its peer dependencies in your adapter's development environment:
npm install @mastra/server-adapters-test-suite
The package requires Mastra Core and Server >=1.64.0-0 <2.0.0-0, Mastra MCP >=1.18.0-0 <2.0.0-0, Vitest >=4.0.0 <5.0.0, and Zod ^3.25.0 || ^4.0.0. Install those peer dependencies in your adapter's development environment.
Usage
Provide framework-specific setup and request execution functions to the shared suite:
import { createRouteAdapterTestSuite } from '@mastra/server-adapters-test-suite';
import { executeHttpRequest, setupAdapter } from './adapter-test-helpers';
createRouteAdapterTestSuite({
suiteName: 'My server adapter',
setupAdapter,
executeHttpRequest,
});
Additional root exports cover MCP routes and transports, multipart requests, HTTP logging, and request body limits.
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.