typescript-e2e-testing

Guide TypeScript NestJS E2E test setup, writing, debugging, and optimization.

Updated May 17, 2026
One-click install
npx skills add https://github.com/thuantan2060/facebook-sale-tracking --skill typescript-e2e-testing-thuantan2060
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-e2e-testing
Source: https://github.com/thuantan2060/facebook-sale-tracking/tree/main/.agents/skills/typescript-e2e-testing
Command: npx skills add https://github.com/thuantan2060/facebook-sale-tracking --skill typescript-e2e-testing-thuantan2060

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you set up, write, run, debug, and optimize TypeScript NestJS E2E/integration tests that depend on real infrastructure so your CI results become consistent instead of flaky or opaque.

Core Features & Use Cases

  • Real infrastructure E2E testing (Docker): Verifies complete user workflows against Kafka, PostgreSQL, MongoDB, and Redis using deterministic orchestration.

  • Given-When-Then test construction (GWT): Ensures every test has clear intent, a single main action, and precise, non-conditional assertions.

  • Flakiness-resistant execution & debugging: Uses smart polling, test isolation patterns, and a “fix one failing test at a time” protocol with temp-file-only logs.

  • Use Case Examples

    • You need to write a new .e2e-spec.ts that validates an endpoint plus side effects in DB and message flows.
    • You have failing or flaky tests caused by consumer readiness, async timing, or shared state and need a structured debug plan.

Quick Start

Ask: "Using the typescript-e2e-testing skill, set up and write a new E2E test for the endpoint described by my prompt, following the Given-When-Then pattern and using Docker-backed real infrastructure."

Frequently Asked Questions about typescript-e2e-testing

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

FAQPage Schema
How do I fix flaky NestJS E2E tests caused by Kafka consumer readiness and async timing?

Fix flaky NestJS E2E tests by applying smart polling for Kafka consumer readiness and strict test isolation. This ensures deterministic execution by validating infrastructure state before assertions, preventing timing-related failures in your `.e2e-spec.ts` files.

What is the best way to run TypeScript integration tests against Docker compose infrastructure?

Run TypeScript integration tests against Docker compose infrastructure by orchestrating real Kafka, PostgreSQL, MongoDB, and Redis containers deterministically. This approach verifies complete user workflows against live dependencies while maintaining strict cleanup rules for test isolation.

Why does my TypeScript E2E test suite fail intermittently in CI despite passing locally?

Your TypeScript E2E test suite fails intermittently in CI due to shared state, async timing issues, or lack of test isolation. Enforcing strict cleanup rules, smart polling for infrastructure readiness, and Given-When-Then compliance resolves these opaque CI results.

How do I debug failing TypeScript E2E tests with a structured protocol?

Debug failing TypeScript E2E tests using a one-failing-test-at-a-time protocol with temp-file-only log output. This structured debug plan isolates individual test failures caused by shared state or consumer readiness issues without generating persistent log clutter.