12 lines
391 B
TypeScript
12 lines
391 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
const Greeting = ({ name }: { name: string }) => <p>Hello {name}</p>;
|
|
|
|
describe('component test harness', () => {
|
|
it('renders through jsdom and Testing Library', () => {
|
|
render(<Greeting name='world' />);
|
|
expect(screen.getByText('Hello world')).toBeInTheDocument();
|
|
});
|
|
});
|