test react RFC
creates a test suite in line with tldv standards for functional components
creates a test suite in line with tldv standards for functional components
Create a comprehensive testing suite in [[LANGUAGE]] employing Jest and React Testing Library. The suite should focus on testing a specific React component while adhering to these guidelines:
Component Import: Import the component directly from its root directory using the '.' notation.
Hook Mocking: Use Jest to mock React hooks. For example: mock useHistory from react-router-dom.
Element Selection: Utilize the screen object from React Testing Library, specifically the getByText method, to select elements.
Event Simulation: Employ userEvent from @testing-library/user-event to simulate user interactions.
Component Rendering: Use the custom helper { renderWithThemeAndQuery } imported from 'utils/renderWithThemeAndQuery' instead of the standard render function.
Test Suite Structure: Include the complete test suite in one file, with at least one describe block containing multiple it or test blocks.
Use the reference code provided as a model for structure and implementation.