blob: b6bfc5db0e38be4d149df6d19fb270db9b0ee26e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { describe, expect, it } from '@jest/globals';
import { render, screen } from '../../../../tests/utils';
import { Button } from './button';
describe('Button', () => {
it('renders the Button component', () => {
render(<Button onClick={() => null}>Button</Button>);
expect(screen.getByRole('button')).toBeInTheDocument();
});
it('renders the Button component with disabled state', () => {
render(
<Button onClick={() => null} disabled={true}>
Disabled Button
</Button>
);
expect(screen.getByRole('button')).toBeDisabled();
});
});
|