typescript-testing - Test code using an APIMatic TypeScript SDK
Test APIMatic TypeScript SDK integrations by faking fetch, validating wire-shaped data, asserting built requests, and covering errors, decoding failures, and retries.
Tags
Updated: 2026-11-10Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Fake the fetch implementation
- Capture built SDK requests
- Stub wire-shaped response bodies
- Validate encoded model fixtures
- Assert decoded success results
- Test declared error arms
- Test undeclared error payloads
- Cover decode-failure paths
- Disable default retries
- Test retry behavior deliberately
- Control SDK logging
- Handle OAuth token requests
Inputs
- APIMatic TypeScript SDK
- SDK operation contract
- Project test runner
- Project assertion style
- Test dependencies
- Model fixtures
- OAuth configuration
Outputs
- TypeScript test files
- Captured request records
- Test assertions
- Test pass or failure results
- Decoded error assertions
- Logged test output
Requirements
- Node.js 18 or later
- TypeScript SDK with fetch options
- Global Response support
- Access to exported model schemas
- Project test runner
