mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 10:00:17 +05:30
feat(renderer): add shadcn label primitive
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user