mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
18 lines
487 B
TypeScript
18 lines
487 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { render, screen } from '@testing-library/react';
|
|
import { Label } from '@/components/ui/label';
|
|
|
|
describe('Label', () => {
|
|
it('renders children and associates with a control', () => {
|
|
render(
|
|
<>
|
|
<Label htmlFor="x">Username</Label>
|
|
<input id="x" />
|
|
</>
|
|
);
|
|
const label = screen.getByText(/username/i);
|
|
expect(label).toBeInTheDocument();
|
|
expect(label.tagName).toBe('LABEL');
|
|
});
|
|
});
|