// @vitest-environment jsdom
import { render, screen, cleanup } from '@testing-library/react';
import { describe, it, expect, afterEach } from 'vitest';
import { Button } from '../Button';
describe('Button', () => {
afterEach(() => {
cleanup();
});
it('passes aria-label to the button element', () => {
render();
const button = screen.getByRole('button', { name: /test label/i });
expect(button).toBeTruthy();
});
it('passes other HTML attributes', () => {
render();
const button = screen.getByTestId('custom-button');
expect(button).toBeTruthy();
});
});