add-e2e-test

Create end-to-end tests for REST controllers and GraphQL resolvers with Fastify injection.

30|3|Updated Mar 8, 2020
One-click install
npx skills add https://github.com/uxname/liteend --skill add-e2e-test-uxname
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-e2e-test
Source: https://github.com/uxname/liteend/tree/main/.agents/skills/add-e2e-test
Command: npx skills add https://github.com/uxname/liteend --skill add-e2e-test-uxname

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create end-to-end tests for REST controllers and GraphQL resolvers using an app that injects Fastify for realistic routing. This skilling is applicable for backend services built on Fastify or NestJS where reliable integration tests are necessary. It requires a testing client, a fastify-based app instance, and a defined harness to construct requests and validate responses.

Core Features & Use Cases

  • Deterministic E2E testing workflow for REST and GraphQL endpoints.
  • Fastify-injection testing harness that isolates integration points.
  • Quick scaffolding templates to bootstrap new tests for existing controllers and resolvers.

Quick Start

Create a new E2E test for a REST endpoint by initializing the testing app and invoking the endpoint with the dedicated test client.

Frequently Asked Questions about add-e2e-test

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

FAQPage Schema
How do I write E2E tests for Fastify REST controllers and GraphQL resolvers?

To write E2E tests for Fastify REST controllers and GraphQL resolvers, inject a Fastify app instance for realistic routing, then use a dedicated testing client and harness to construct requests and validate endpoint responses deterministically.

What is Fastify injection testing and when do I need it for Node.js integration tests?

Fastify injection testing is an integration testing method that isolates REST and GraphQL endpoints without starting an actual HTTP server. You need it to construct and validate requests deterministically for backend services requiring reliable E2E test coverage.

Can I use this E2E testing workflow with a NestJS backend application?

Yes, you can use this E2E testing workflow with a NestJS backend application. The testing harness is applicable for backend services built on Fastify or NestJS where reliable integration tests are necessary.

What's the best way to scaffold new integration tests for existing endpoints?

The best way to scaffold new integration tests is using quick scaffolding templates that bootstrap new tests for existing controllers and resolvers, initializing a testing app instance and invoking endpoints with a dedicated test client.

Do I need a defined testing harness to validate GraphQL responses in Node.js?

Yes, you need a defined testing harness to construct requests and validate GraphQL responses. The E2E testing workflow requires a testing client, a Fastify-based app instance, and this harness to isolate integration points effectively.