OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add github/awesome-copilot --skill react19-test-patterns
Provides before/after patterns for migrating test files to React 19 compatibility, including act() imports, Simulate removal, and StrictMode call count changes.
npx skills add github/awesome-copilot --skill react19-test-patterns
Reference for all test file migrations required by React 19.
Fix test files in this order; each layer depends on the previous:
act import fix first, it unblocks everything elseSimulate → fireEvent fix immediately after actIf mixed with other test-utils imports:
| Old (react-dom/test-utils) | New location |
|---|---|
act | import { act } from 'react' |
Simulate | fireEvent from @testing-library/react |
renderIntoDocument | render from @testing-library/react |
findRenderedDOMComponentWithTag | getByRole, getByTestId from RTL |
findRenderedDOMComponentWithClass | getByRole or container.querySelector |
scryRenderedDOMComponentsWithTag | getAllByRole from RTL |
isElement, isCompositeComponent | Remove not needed with RTL |
isDOMComponent | Remove |
React 19 StrictMode no longer double-invokes useEffect in development. Spy assertions counting effect calls must be updated.
Strategy always measure, never guess: