import React from 'react'; import { ScaleBand, ScaleLinear } from 'eazychart-core/src'; import { act, RenderResult, waitFor } from '@testing-library/react'; import { dimensions, rawData, colors, horizontalBandScaleDef, verticalLinearScaleDef, } from 'eazychart-core/src/sample-data'; import { Bars } from '@/components/Bars'; import { Chart } from '@/components/Chart'; import { baseChartProps, renderSVG } from 'tests/common'; import 'tests/mocks/ResizeObserver'; import { CartesianScale } from '@/components/scales/CartesianScale'; import { ColorScale } from '@/components/scales/ColorScale'; describe('Bars', () => { it('renders svg rects with the right coordinates / dimensions', async () => { let wrapper: RenderResult; act(() => { wrapper = renderSVG( <>{null}, TooltipComponent: () => <>{null}, }} > ); }); await waitFor(() => { expect(wrapper.container.innerHTML).toMatchSnapshot(); }); }); });