UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

16 lines (15 loc) 672 B
import { jsx as _jsx } from "react/jsx-runtime"; import { fireEvent, render } from '@testing-library/react'; import { ToggleButton } from './toggle-button'; describe('<ToggleButton>', () => { test(' it should render properly', () => { const { container, getByTestId } = render(_jsx(ToggleButton, { restingIcon: "bell" })); const el = getByTestId('ToggleButton'); fireEvent.click(el); expect(container).not.toBeNull(); }); test(' it should render properly with props', () => { const { container } = render(_jsx(ToggleButton, { restingIcon: "bell", pressed: true })); expect(container).not.toBeNull(); }); });