chart.spec.tsx 503 B

123456789101112131415
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import Chart, {ChartType} from 'sentry/views/starfish/components/chart';
  3. describe('Chart', function () {
  4. test('it shows an error panel if an error prop is supplied', function () {
  5. const parsingError = new Error('Could not parse chart data');
  6. render(
  7. <Chart error={parsingError} data={[]} loading={false} type={ChartType.LINE} />
  8. );
  9. expect(screen.getByTestId('chart-error-panel')).toBeInTheDocument();
  10. });
  11. });