import { screen } from '@testing-library/react'; import { DoughnutChart } from '../../../shlink-web-component/visits/charts/DoughnutChart'; import { setUpCanvas } from '../../__helpers__/setUpTest'; describe('', () => { const stats = { foo: 123, bar: 456, }; it('renders Doughnut with expected props', () => { const { events } = setUpCanvas(); expect(events).toBeTruthy(); expect(events).toMatchSnapshot(); }); it('renders expected legend', () => { setUpCanvas(); expect(screen.getByText('foo')).toBeInTheDocument(); expect(screen.getByText('bar')).toBeInTheDocument(); }); });