React — React Testing with Jest
Jest
is a JavaScript testing framework. React apps often use it with React Testing Library to write unit tests for components and logic.
// Example test file (App.test.js)
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders hello message', () => {
render(<App />);
const element = screen.getByText(/hello/i);
expect(element).toBeInTheDocument();
});