testing-lucky

Write and fix Jest unit/integration tests for the Lucky Discord bot.

17|8|Updated Apr 11, 2022
One-click install
npx skills add https://github.com/LucasSantana-Dev/Lucky --skill testing-lucky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-lucky
Source: https://github.com/LucasSantana-Dev/Lucky/tree/main/.cursor/skills/testing-lucky
Command: npx skills add https://github.com/LucasSantana-Dev/Lucky --skill testing-lucky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of writing, debugging, and maintaining unit and integration tests for the Lucky project, ensuring code quality and stability.

Core Features & Use Cases

  • Unit Test Creation: Write new unit tests for services and middleware.
  • Test Debugging: Fix broken or disabled tests, resolve module resolution issues, and understand Jest mock patterns.
  • Integration Testing: Add integration tests for backend API routes.
  • Use Case: When a new feature is added to a service, use this Skill to write comprehensive unit tests that cover happy paths and error conditions, ensuring the service functions as expected.

Quick Start

Use the testing-lucky skill to write a new unit test for the UserService in packages/backend/tests/unit/services/.

Frequently Asked Questions about testing-lucky

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

FAQPage Schema
How do I write Jest unit tests for a Discord bot service?

Jest unit tests for Discord bot services are written by defining test suites in the test directory that cover happy paths and error conditions, ensuring new service features function as expected.

Why are my Jest ESM mocks not working with the project configuration?

Jest ESM mock pattern issues often stem from module resolution conflicts. This Skill helps resolve module resolution problems and understand specific Jest ESM mock patterns within the project configuration.

How do I mock Prisma and Redis clients in integration tests?

Mocking Prisma and Redis clients in integration tests requires proper mock setup for external dependencies. This Skill provides patterns to configure mock clients compatible with the Jest environment.

Can I use Jest to add integration tests for backend API routes?

Yes, Jest can be used to add integration tests for backend API routes. This Skill facilitates adding integration tests to validate backend endpoints within the project specific Jest configuration.

What is the best way to fix broken or disabled Jest tests?

Fixing broken or disabled Jest tests involves debugging test failures and resolving module resolution issues. This Skill helps identify root causes and restore disabled tests to a passing state.