import { render } from '@testing-library/react'; import { Chart } from '../Chart/Chart'; import { ChartGroup } from '../ChartGroup/ChartGroup'; import { ChartThreshold } from './ChartThreshold'; Object.values([true, false]).forEach(() => { test('ChartThreshold', () => { const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); }); test('renders component data', () => { const data = [ { name: 'Birds Threshold', x: 0, y: 2 }, { name: 'Birds Threshold', x: 2, y: 2 }, { name: 'Birds Threshold', x: 2, y: 3 }, { name: 'Birds Threshold', x: 5, y: 3 } ]; const { asFragment } = render( ); expect(asFragment()).toMatchSnapshot(); });