@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
15 lines (14 loc) • 615 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { fireEvent, render } from '@testing-library/react';
import { Chip } from './chip';
describe('<Chip>', () => {
test(' it should render properly', () => {
const { container } = render(_jsx(Chip, { icon: "bell", children: "Text" }));
expect(container).not.toBeNull();
});
test(' it should dismiss properly', () => {
const { container, getByTestId } = render(_jsx(Chip, { interactive: true, children: "Text" }));
fireEvent.click(getByTestId('InteractiveButton'));
expect(container).not.toBeNull();
});
});