import { render, screen } from '@testing-library/react'; import { userEvent } from '@testing-library/user-event'; import { describe, expect, it } from 'vitest'; import { Popover } from './Popover.tsx'; const TestPopover = () => ( Open Place content for the popover here. ); describe('Popover', () => { it('should function correctly', async () => { render(); expect(screen.getByText('Open')).toBeInTheDocument(); expect(() => screen.getByText('Place content for the popover here.')).toThrow(); await userEvent.click(screen.getByText('Open')); expect(screen.getByText('Place content for the popover here.')).toBeInTheDocument(); }); });