testing-workflow

Run Vitest and Playwright tests with native module rebuilds and coverage reports.

1|Updated Oct 8, 2025
One-click install
npx skills add https://github.com/fattits30-dev/Justice-Companion --skill testing-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-workflow
Source: https://github.com/fattits30-dev/Justice-Companion/tree/main/.claude/skills/testing-workflow
Command: npx skills add https://github.com/fattits30-dev/Justice-Companion --skill testing-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires vitest, playwright, better-sqlite3, tsx.

What problem does it solve?

This Skill orchestrates a comprehensive testing strategy, simplifying the management of unit, integration, and E2E tests. It ensures native module compatibility and provides detailed coverage reports, eliminating setup errors and guaranteeing code quality.

Core Features & Use Cases

  • Multi-Layer Testing: Runs Vitest for fast unit/integration tests and Playwright for robust End-to-End (E2E) tests.
  • Native Module Compatibility: Automatically rebuilds better-sqlite3 for the correct Node.js test runtime, preventing common errors.
  • Coverage Reports: Generates detailed code coverage to track quality metrics and identify untested areas.
  • Use Case: Before pushing code, Claude automatically runs all unit, integration, and E2E tests, ensuring native modules are correctly rebuilt for the test environment, and provides a coverage report, guaranteeing code quality and stability.

Quick Start

Run all unit and integration tests

pnpm test

Generate a code coverage report

pnpm test:coverage

Run all End-to-End (E2E) tests with Playwright

pnpm test:e2e

CRITICAL: Rebuild native modules for Node.js runtime before tests

pnpm rebuild:node