import { render } from '@testing-library/react'; import { ChartLegend } from './ChartLegend'; import { ChartLabel } from '../ChartLabel/ChartLabel'; Object.values([true, false]).forEach(() => { test('ChartLegend', () => { const { asFragment } = render( } labelComponent={} /> ); expect(asFragment()).toMatchSnapshot(); }); }); test('renders component data', () => { const { asFragment } = render( } labelComponent={} /> ); expect(asFragment()).toMatchSnapshot(); });