test-watch-focused-patterns

Run tests in watch mode with file pattern filters.

1|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/zgagnon/skills --skill test-watch-focused-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-watch-focused-patterns
Source: https://github.com/zgagnon/skills/tree/main/test-watch-focused-patterns
Command: npx skills add https://github.com/zgagnon/skills --skill test-watch-focused-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers get rapid feedback on their tests by running only the relevant tests in watch mode, significantly speeding up the development and refactoring of test suites.

Core Features & Use Cases

  • Watch Mode Execution: Runs tests automatically as files change.
  • Focused Pattern Matching: Filters tests to run only those matching specific file or name patterns.
  • Use Case: When developing a new feature, use this Skill to run only the tests related to that feature, getting instant feedback on your changes without waiting for the entire test suite to complete.

Quick Start

Run tests in watch mode, focusing on files related to user authentication.

Frequently Asked Questions about test-watch-focused-patterns

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

FAQPage Schema
How do I run vitest in watch mode for specific test files?

You can run vitest in watch mode with file pattern filters to execute only matching tests. This provides instant, targeted feedback during test development by automatically re-running relevant tests when files change.

What is the best way to get instant feedback when refactoring existing tests?

The best way to get instant feedback when refactoring existing tests is using watch mode with focused pattern matching. This approach automatically re-runs only the tests matching your specific file or name patterns upon changes.

Can I filter jest watch mode to run only tests related to a new feature?

Yes, you can filter watch mode to run only tests related to a new feature using file pattern filters. This allows you to get rapid feedback on your changes without waiting for the entire test suite to complete.

Does focused watch mode work for debugging flaky tests?

Focused watch mode works for debugging flaky tests by continuously running only the targeted test patterns. It automatically re-runs the relevant tests on file changes, maintaining a fast feedback loop while you investigate instability.

Why use file pattern filters in watch mode instead of running the full test suite?

Using file pattern filters in watch mode isolates relevant tests, providing rapid feedback during development. Running the full test suite wastes time, whereas targeted pattern matching ensures only affected tests execute upon file changes.