mozaic-ui
Version:
Mozaic UI is a minimal and extensible UI component library for React. It provides reusable, accessible, and customizable components, perfect for modern web interfaces. Built with scalability and developer experience in mind.
15 lines (14 loc) • 581 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { render, screen } from '@testing-library/react';
import { Button } from './Button';
describe('Button', () => {
it('renders with default props', () => {
render(_jsx(Button, { children: "Click Me" }));
expect(screen.getByText('Click Me')).toBeInTheDocument();
});
it('applies the correct variant class', () => {
render(_jsx(Button, { variant: "success", children: "Success" }));
const btn = screen.getByText('Success');
expect(btn.className).toMatch(/success/);
});
});