testing

Implement automated tests for the Celebra-me project using Jest, React Testing Library, and Playwright.

Updated Jun 21, 2024
One-click install
npx skills add https://github.com/fm-dev-mx/celebra-me --skill testing-fm-dev-mx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/fm-dev-mx/celebra-me/tree/main/.agent/skills/testing
Command: npx skills add https://github.com/fm-dev-mx/celebra-me --skill testing-fm-dev-mx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures the reliability and stability of the Celebra-me codebase by providing comprehensive testing strategies and patterns.

Core Features & Use Cases

  • Unit & Component Testing: Write tests for individual functions and UI components using Jest and React Testing Library.
  • Schema Validation: Ensure data integrity with Zod schema tests.
  • End-to-End (E2E) Testing: Prepare for future E2E testing with Playwright.
  • Use Case: Before deploying a new feature, run all tests to catch regressions and verify that user interactions function as expected.

Quick Start

Run all project tests using the command pnpm test.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I write automated tests for React components using Jest and React Testing Library?

Automated testing for React components uses Jest and React Testing Library to verify individual UI functions and interactions. This approach enforces code reliability by validating component behavior and preventing regressions before deployment.

What's the best way to validate data schemas in a testing environment?

Schema validation testing ensures data integrity using Zod schemas within your test suite. By validating data structures against defined schemas, you prevent type mismatches and ensure data consistency across the application.

How does end-to-end testing work with Playwright?

End-to-end testing with Playwright automates browser interactions to verify user workflows function correctly. It simulates real user behavior across the application to catch regressions and ensure overall system stability.

Can I use this testing setup without installing additional dependencies?

This testing setup requires no external dependencies to implement, as it guides patterns for Jest, React Testing Library, and Playwright. You simply run the project tests using the command pnpm test to verify code quality.

Why do I need to follow specific file naming conventions for testing?

Following defined test organization and file naming conventions ensures consistent test discovery and execution across the project. Proper structure maintains code reliability by keeping unit, component, and schema validation tests systematically organized.