import { render } from '@testing-library/react'; import { ChartLegendTooltipContent } from './ChartLegendTooltipContent'; Object.values([true, false]).forEach(() => { test('ChartLegendTooltipContent', () => { const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); }); test('renders component text', () => { const legendData = [ { name: 'Cats' }, { name: 'Dogs', symbol: { type: 'dash' } }, { name: 'Birds' }, { name: 'Mice' } ]; const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); });