testing

Define and enforce Vitest and Playwright testing strategies for GeroCare.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/DevXoje/gerocare --skill testing-devxoje
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/DevXoje/gerocare/tree/main/.cursor/skills/testing
Command: npx skills add https://github.com/DevXoje/gerocare --skill testing-devxoje

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a clear, repeatable approach to testing GeroCare applications, consolidating unit, integration, and end-to-end testing into a cohesive strategy so changes are reliably verified.

Core Features & Use Cases

  • Testing stack: Vitest for unit tests and Playwright for end-to-end tests, with a suite of utilities to accelerate writing tests.
  • Test infrastructure: Factories, test helpers, and mocks to simulate Firebase, Vue Router, and Pinia, enabling isolated and fast tests.
  • Use Case: When adding features, changing business logic, or validating UI components, apply these patterns to produce robust, maintainable tests across the project.

Quick Start

Start by setting up Vitest and Playwright, create a simple test using a factory, and run unit tests to confirm the setup. Then extend with integration tests and small end-to-end tests as needed.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I set up Vitest and Playwright for Vue testing?

Vitest and Playwright setup involves installing the tools, creating an initial test using a factory, and running unit tests to confirm the configuration before extending with integration and end-to-end tests.

What is the best way to mock Firebase, Vue Router, and Pinia in tests?

Mocking Firebase, Vue Router, and Pinia is handled through dedicated test helpers and factories that simulate these dependencies, enabling isolated and fast tests across the application codebase.

How do I structure unit, integration, and end-to-end testing workflows?

Structuring unit, integration, and end-to-end testing workflows requires applying specified conventions for tooling, file structure, and reusable patterns to ensure repeatable, maintainable tests across the project.

Do I need test factories to write maintainable Vitest unit tests?

Test factories are needed to generate consistent test data and simulate dependencies, which accelerates writing Vitest unit tests and ensures they remain maintainable and repeatable.

Can I use Playwright for end-to-end testing alongside Vitest unit tests?

Playwright can be used for end-to-end testing alongside Vitest unit tests, consolidating both into a cohesive testing strategy so changes are reliably verified.

Why does mocking Vue Router and Pinia improve test isolation?

Mocking Vue Router and Pinia improves test isolation by replacing state management and routing dependencies with controlled simulations, preventing external side effects from interfering with test outcomes.