Toolverse
All skills

capture-api-response-test-fixture

by vercel

Capture API response test fixture.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
vercel
Category
Testing
Views
18

About this skill

Capture API response test fixture.

How to use

  1. Przygotuj skrypt testowy w folderze /examples/ai-functions. Dla generateText zaimportuj openai, generateText i funkcję run, następnie wywołaj generateText z wybranym modelem i promptem, logując surową odpowiedź do konsoli za pomocą console.log(JSON.stringify(result.response.body, null, 2)).

  2. Uruchom skrypt poleceniem pnpm tsx src/sciezka/do/skryptu.ts i skopiuj wynik z konsoli.

  3. Utwórz folder fixtures w odpowiedniej ścieżce pakietu (np. packages/openai/src/responses/fixtures) i wklej skopiowaną odpowiedź do nowego pliku, przestrzegając konwencji nazewnictwa używanej w istniejących fixture'ach.

  4. Dla testów streamText ustaw includeRawChunks na true, zaimportuj helper saveRawChunks i uruchom skrypt z folderu /examples/ai-functions — wynik zostanie automatycznie zapisany w folderze output.

  5. Przenieś wygenerowany plik z output do folderu fixtures w pakiecie, zachowując odpowiednią nazwę.

  6. Skonfiguruj test parsowania w pliku testowym (np. openai-responses-language-model.test.ts), odwołując się do fixture'a i używając helper'ów testowych do weryfikacji poprawności parsowania odpowiedzi.

Related skills

playwright-cli

by microsoft

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

Testing
45103

crypto-research

by stevengonsalvez

Comprehensive cryptocurrency market research and analysis using specialized AI agents. Analyzes market data, price trends, news sentiment, technical indicators, macro correlations, and investment opportunities. Use when researching cryptocurrencies, analyzing crypto markets,

Testing
14118

go-dev-guidelines

by jumppad-labs

This skill should be used when writing, refactoring, or testing Go code. It provides idiomatic Go development patterns, TDD-based workflows, project structure conventions, and testing best practices using testify/require and mockery. Activate this skill when creating new Go

Testing
1190

powershell-windows

by davila7

PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.

Testing
1074

dependency-upgrade

by wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

Testing
17138

lean4-theorem-proving

by cameronfreer

Use when developing Lean 4 proofs, facing type class synthesis errors, managing sorries/axioms, or searching mathlib - provides build-first workflow, instance management patterns (haveI/letI), and domain-specific tactics

Testing
9108