smithery/RIMTHAN-LAB

api-test-e2e

Generate E2E tests using Jest and Testcontainers for PostgreSQL, Redis, and RabbitMQ with full application stack testing. Use when testing API endpoints end-to-end or verifying multi-tenancy isolation.

Installation

$ npx skills add smithery/RIMTHAN-LAB --skill api-test-e2e

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/RIMTHAN-LAB.

npx skills add smithery/RIMTHAN-LAB

Browse all from smithery/RIMTHAN-LAB

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Write, Edit, Glob, Grep

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,443 B
  • docs SUMMARY.md 221 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

E2E Tests

Purpose

Generate end-to-end tests using Jest + Testcontainers for real PostgreSQL, Redis, and RabbitMQ instances with proper setup, teardown, and tenant isolation testing.

Why Jest Instead of node:test?

This repository uses Jest for ALL testing instead of Node.js's built-in node:test runner:

  • Issue: nestjs/nest#14130 - NestJS @nestjs/testing is incompatible with node:test
  • Impact: node:test cannot properly inject QueryBus, CommandBus, or other NestJS providers
  • Solution: Jest provides full compatibility with NestJS's testing utilities and DI system

Note: These are E2E tests that test the entire application stack. For module-level integration tests with co-located test fixtures, use test-integration.

When to Use

  • Testing API endpoints end-to-end
  • Verifying database operations
  • Testing multi-tenancy isolation
  • Validating integration with Redis/RabbitMQ
  • Testing CQRS flows

What It Generates

Directory Structure

apps/api/test/{feature}.e2e-spec.ts

E2E vs Integration Tests:

  • E2E Tests (test/): Full application stack, Testcontainers, HTTP requests
  • Integration Tests (src/modules/{feature}/tests/): Module-level, co-located fixtures, direct imports

Patterns Enforced

Testcontainers Setup

  • PostgreSQL container for database
  • Redis container for caching
  • RabbitMQ container for events
  • Migrations run before tests
  • Cleanup after each test

Unique Test Data

  • Random UUIDs for test entities
  • Random emails to avoid conflicts
  • Tenant isolation verification

Tenant Isolation Tests

  • Verify cross-tenant access is blocked
  • Verify each tenant sees only their data
  • Verify audit logging per tenant

Usage Example

/skill test-e2e --name=Users --endpoints='POST /users,GET /users/:id,PATCH /users/:id,DELETE /users/:id'

Related Files

  • [Test Unit](../test-unit/SKILL.md) - Unit tests
  • [Test Integration](../test-integration/SKILL.md) - Integration tests
  • [Feature CQRS](../../core/feature-cqrs/SKILL.md) - Features to test