fastify-testing

Execute standardized Fastify testing conventions with node-tap for helpers and routes.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/fgiova/claude-marketplace --skill fastify-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fastify-testing
Source: https://github.com/fgiova/claude-marketplace/tree/main/plugins/fastify-testing/skills/fastify-testing
Command: npx skills add https://github.com/fgiova/claude-marketplace --skill fastify-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tests for Fastify apps often lack consistent conventions, leading to brittle tests and inconsistent quality. This skill provides a unified blueprint for testing Fastify projects with node-tap, ensuring reliable unit tests for helpers and route handlers.

Core Features & Use Cases

  • Establishes a reusable testing structure, including TypeScript typings for TestWithContext, Prisma integration, and app lifecycle patterns.
  • Covers unit tests for helpers and route handlers, with guidance for mocking external HTTP calls via undici MockAgent.
  • Applies to end-to-end workflows where you need predictable test context and error handling.

Quick Start

Run the test suite to validate unit and integration tests for Fastify helpers and routes.

Frequently Asked Questions about fastify-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Fastify testing with node-tap and TypeScript?

Fastify testing with node-tap uses standardized conventions for test structure, naming, setup/teardown, and error handling, applying TypeScript typings for TestWithContext and Prisma integration to ensure consistent, reliable tests for helpers and routes.

How do I mock external HTTP calls in Fastify route tests?

Mocking external HTTP calls in Fastify tests is handled via undici MockAgent, which intercepts network requests during route handler unit tests to provide predictable, reproducible test contexts without real external dependencies.

Does this Fastify testing convention support Prisma integration?

Yes, the Fastify testing conventions support Prisma integration by establishing strict test context setup, ensuring database interactions are safely managed during setup and teardown for reproducible unit and integration tests.

What is the best way to standardize unit tests for Fastify route handlers?

The best way to standardize Fastify route handler tests is applying a unified node-tap blueprint that defines required patterns for test structure, naming, and error handling, promoting safe and reproducible results across the application.

Why are my Fastify tests brittle and inconsistent across helpers?

Fastify tests often become brittle due to a lack of consistent conventions; applying a unified node-tap blueprint with strict test context setup, Prisma integration, and standardized error handling ensures reliable and reproducible results.