packages/charts/react-charting/docs/TestPlans/TestingGuide.md
This document highlights few common testing practices for any new tests that are being added to the charting library.
testWithoutWait, testWithWait and testScreenResolutionChanges can be used in writing the component tests which will reduce the number of lines of code.testWithWait is needed when we are either trying to provide any prop and update or we are trying to extract any sub-sub svg element like bars within the vertical bar chart.import { chartPoints } from '../VerticalBarChart/VerticalBarChart.test';
import { render, screen, queryAllByAttribute, fireEvent, act } from '@testing-library/react';
However, reordering the import sequence results in the correct rendering as follows:
import { render, screen, queryAllByAttribute } from '@testing-library/react';
import { chartPoints } from './VerticalBarChart.test';