mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
feat(renderer): add shadcn input primitive
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { Input } from '@/components/ui/input';
|
||||
|
||||
describe('Input', () => {
|
||||
it('renders and accepts typing', async () => {
|
||||
const onChange = vi.fn();
|
||||
render(<Input aria-label="name" onChange={onChange} />);
|
||||
const input = screen.getByLabelText(/name/i);
|
||||
await userEvent.type(input, 'a');
|
||||
expect(onChange).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user