Skip to content

Instantly share code, notes, and snippets.

@Oluwasetemi
Created August 13, 2021 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oluwasetemi/626fcd9939e12458dd8732292f772440 to your computer and use it in GitHub Desktop.
Save Oluwasetemi/626fcd9939e12458dd8732292f772440 to your computer and use it in GitHub Desktop.
The default test that comes with a create react app template
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment