React Component Tests with React Testing Library
Use Copilot to write RTL tests for rendering and interactions of a React component.
category:testing
react
react-testing-library
frontend-tests
0
Prompt
Write tests for the following React component using React Testing Library. Requirements: - Test initial render. - Test key user interactions (clicks, typing, etc.). - Test asynchronous behaviour if the component fetches data or updates later. - Avoid testing implementation details; focus on user-visible behaviour. Component: [Paste component here]