import { useState } from 'react'; import { render, screen } from '@testing-library/react'; import { describe, expect, it } from 'vitest'; import { BooleanField } from './BooleanField.tsx'; import type { BooleanFieldProps } from './BooleanField.tsx'; const TestBooleanField = ({ variant }: Pick) => { const [error, setError] = useState(); const [value, setValue] = useState(); return ( ); }; describe('BooleanField', () => { it('should render a checkbox field', () => { render(); expect(screen.getByRole('checkbox')).toBeInTheDocument(); expect(() => screen.getByRole('radiogroup')).toThrow(); }); it('should render a radio field', () => { render(); expect(screen.getByRole('radiogroup')).toBeInTheDocument(); expect(() => screen.getByRole('checkbox')).toThrow(); }); });