import { expect, test } from 'vitest' import { render } from 'vitest-browser-react' import { MyButton } from '../src' test('button', async () => { const screen = await render() const buttonElement = screen.getByRole('button') expect(buttonElement).toBeInTheDocument() expect(buttonElement).toHaveTextContent('my button type: primary count: 0') expect(screen.container.innerHTML).toMatchInlineSnapshot( `""`, ) expect(buttonElement).toHaveClass('my-button') })