Use forms with or without client-side JavaScript--no code duplication required!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.test.tsx 381 B

12345678910111213
  1. import React from 'react';
  2. import { render, screen } from '@testing-library/react';
  3. import '@testing-library/jest-dom';
  4. import Hello from '../src';
  5. describe('Example', () => {
  6. it('should have the expected content', () => {
  7. const greeting = 'World';
  8. render(<Hello greeting={greeting} />);
  9. expect(screen.getByText(`Hello ${greeting}`)).toBeInTheDocument();
  10. });
  11. });