react19-test-patterns

Migrate JavaScript test files to React 19 compatibility with act() and fireEvent patterns.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/VSF-QC-TTS/vf-qc-copilot --skill react19-test-patterns-vsf-qc-tts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react19-test-patterns
Source: https://github.com/VSF-QC-TTS/vf-qc-copilot/tree/main/.agents/skills/react19-test-patterns
Command: npx skills add https://github.com/VSF-QC-TTS/vf-qc-copilot --skill react19-test-patterns-vsf-qc-tts

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers quickly and effectively migrate their test files to React 19 compatibility, ensuring a smooth transition and minimizing manual effort.

Core Features & Use Cases

  • Before/After Patterns: Provides clear, step-by-step instructions for common migration tasks, such as updating imports and handling changes in StrictMode.
  • Act() Import Fix: Guides on updating the 'act' import from 'react-dom/test-utils' to 'react'.
  • Simulate to fireEvent: Converts Simulate usage to fireEvent for React 19 compatibility.
  • Full API Map: Lists the old and new locations of all deprecated test utilities.
  • StrictMode Call Count Fixes: Offers strategies for adjusting StrictMode call count assertions in tests.

Quick Start

Run the 'react19-test-patterns' skill to review the migration patterns for React 19 test file compatibility.

Frequently Asked Questions about react19-test-patterns

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

FAQPage Schema
How do I migrate React test files to React 19 compatibility?

React 19 test migration requires updating act imports from react-dom/test-utils to react, converting Simulate to fireEvent, and adjusting StrictMode call count assertions using provided before and after patterns.

Why does React 19 remove Simulate and how do I fix it?

React 19 removes Simulate from test utilities; convert Simulate usage to fireEvent for React 19 compatibility, utilizing a full API map listing old and new locations of deprecated test utilities.

How do I fix act import errors in React 19 tests?

Fix act import errors in React 19 tests by updating the act import from react-dom/test-utils to react, following step-by-step instructions for common migration tasks and updating imports.

How do I handle StrictMode call count changes in React 19 tests?

Handle StrictMode call count changes in React 19 tests by applying specific strategies for adjusting StrictMode call count assertions, ensuring test expectations align with updated rendering behavior.

Does React 19 test migration require updating all deprecated test utilities?

React 19 test migration requires updating deprecated test utilities; a full API map lists old and new locations of all deprecated test utilities to ensure complete compatibility across your test suite.