The unit test for computeTooltipPosition covers the flip/clamp math, but the math was never broken — the crash came from the effect re-running on its own setPos. Add a component test (both review agents' top request) that renders ChartTooltipPortal and asserts the positioning effect does NOT re-run when the component re-renders with an unchanged coordinate, and DOES re-run when the coordinate changes. Verified it fails against the pre-fix dependency-less effect. ChartTooltipPortal is exported for this, matching how StackedBarShape is exported for its test. |
||
|---|---|---|
| .. | ||
| css | ||
| js | ||
| views | ||