test-writer

Guide writing unit, integration, and end-to-end tests with Jest, Vitest, and Playwright.

Updated Aug 19, 2025
One-click install
npx skills add https://github.com/wannysim/mumak-www --skill test-writer-wannysim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/wannysim/mumak-www/tree/main/.cursor/skills/test-writer
Command: npx skills add https://github.com/wannysim/mumak-www --skill test-writer-wannysim

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance and patterns for writing effective unit, integration, and end-to-end tests using popular JavaScript testing frameworks.

Core Features & Use Cases

  • Framework Guidance: Learn best practices for Jest, Vitest, and Playwright.
  • Test Structure: Understand file location rules and naming conventions.
  • Pattern Examples: See practical examples for component, hook, and E2E tests.
  • Use Case: When you need to write a new unit test for a React component, this Skill will show you the correct file placement and provide a template for your test.

Quick Start

Use the test-writer skill to generate a unit test for a new React component.

Frequently Asked Questions about test-writer

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

FAQPage Schema
How do I write a unit test for a React component using Vitest?

To write a unit test for a React component using Vitest, follow the AAA pattern and accessibility-first querying. Place your test files using standard location conventions and apply provided naming strategies for clear structure.

What is the best way to structure Playwright end-to-end tests?

The best way to structure Playwright end-to-end tests is by adhering to standard file location rules and naming conventions. This ensures maintainable E2E test suites by following practical pattern examples for structured test development.

Does this testing guidance cover integration tests with Jest?

Yes, this testing guidance covers integration tests with Jest alongside unit and end-to-end tests. It provides practical code examples, file location conventions, and naming strategies to facilitate effective test development across these frameworks.

How do I structure hook tests in JavaScript testing frameworks?

To structure hook tests in JavaScript testing frameworks, utilize the AAA pattern and provided practical examples. Following specific file location conventions and naming strategies ensures your hook tests remain organized and maintainable.

Can I use accessibility-first querying when writing component tests?

Yes, you can use accessibility-first querying when writing component tests. This approach is explicitly facilitated to improve test robustness, combined with standard file location rules and naming conventions for comprehensive test coverage.