import { createRef } from 'react'; import { render, screen } from '@testing-library/react'; import Button from './Button'; describe('Button', () => { it('handles click', () => { const mockOnClick = jest.fn< [ { event: React.MouseEvent | React.KeyboardEvent; }, ], // @ts-expect-error - TS2344 - Type 'undefined' does not satisfy the constraint 'any[]'. undefined >(); render(