UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

27 lines (26 loc) 1.21 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { render } from '@testing-library/react'; import { Symbol } from '../symbol'; import { Card } from './card'; describe('<Card>', () => { test('it should render properly', () => { const { container } = render(_jsx(Card, {})); expect(container).not.toBeNull(); }); test('it should render properly with props', () => { const { container } = render(_jsx(Card, { bordered: true, vibrant: true, highlightOnHover: true })); expect(container).not.toBeNull(); }); test('it should render properly with left element', () => { const { container } = render(_jsx(Card, { left: _jsx(Symbol, { source: "bell", dimension: "32" }) })); expect(container).not.toBeNull(); }); test('it should render properly with right element', () => { const { container } = render(_jsx(Card, { right: _jsx(Symbol, { source: "bell", dimension: "32" }) })); expect(container).not.toBeNull(); }); test('it should render properly with child element', () => { const { container } = render(_jsx(Card, { children: "Some content here" })); expect(container).not.toBeNull(); }); });