jest-expert

Write, fix, and review Jest tests for backend environments with Supertest and Testcontainers.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/saschadudkin-sketch/rezidence4 --skill jest-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jest-expert
Source: https://github.com/saschadudkin-sketch/rezidence4/tree/main/.agents/skills/jest-expert
Command: npx skills add https://github.com/saschadudkin-sketch/rezidence4 --skill jest-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jest, supertest, testcontainers, and includes scripts (resource) components.

What problem does it solve?

Streamline backend testing with Jest, ensuring comprehensive coverage and maintainable test suites.

Core Features & Use Cases

  • Jest Test Writing: Guidance on writing effective Jest tests for backend logic.
  • Route Testing: Best practices for testing Express routes using Supertest.
  • Integration Tests: Integration with PostgreSQL and Redis databases, and handling of mocked services and timers.
  • Use Case: When developing a REST API, this Skill helps you create robust tests that cover critical scenarios without the overhead of extensive manual setup.

Quick Start

Execute a critical coverage test on the backend test suite using the command: cd backend && npm run test:coverage:critical.

Frequently Asked Questions about jest-expert

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

FAQPage Schema
How do I write Jest tests for Express routes using Supertest?

Jest tests for Express routes are written by sending HTTP requests through Supertest and asserting the response status, body, and headers within the Jest test suite. This Skill provides best practices for route testing.

What is the best way to test backend logic with mocked services and timers in Jest?

Testing backend logic with mocked services involves replacing external dependencies and timers with Jest mock functions to isolate the code under test. This Skill offers comprehensive guidelines for handling mocks effectively.

How do I run integration tests for PostgreSQL and Redis databases in a Jest environment?

Integration tests for PostgreSQL and Redis run by spinning up database instances via Testcontainers and executing connection queries within the Jest environment. This Skill provides the setup commands and guidelines for database testing.

Do I need Testcontainers installed to execute integration tests with this Jest setup?

Yes, Testcontainers is a required dependency to isolate and run the database integration tests for PostgreSQL and Redis. You must install Jest, Supertest, and Testcontainers before executing the provided test scripts.

How do I execute a critical coverage test on my backend test suite?

Critical coverage tests are executed by running the command `cd backend && npm run test:coverage:critical` in your terminal. This ensures a high standard of code coverage for critical backend scenarios.

Why does my backend test suite fail to cover critical scenarios without extensive manual setup?

Backend test suites fail critical coverage due to missing integration tests for databases and improperly mocked services. This Skill streamlines the setup to ensure comprehensive coverage and maintainable tests.