add tests for helper functions on bar

This commit is contained in:
Loewy
2024-01-10 16:34:27 -08:00
parent 4dda9eb24c
commit 6c7ceb3eb3
4 changed files with 68 additions and 61 deletions

View File

@@ -39,10 +39,10 @@ export const Bar: React.FC<BarProps> = ({
return (
<Path
key={`bar-${barNumber}-${index}`}
d={drawBarPath(xOrigin, yOrigin, barWidth, height, roundedRadius)}
fill={fill}
testID={`bar-${barNumber}-${index}`}
key={`bar-path-${barNumber}-${index}`}
d={drawBarPath(xOrigin, yOrigin, barWidth, height, roundedRadius)}
fill={fill}
testID={`bar-${barNumber}-${index}`}
/>
);
};

View File

@@ -21,7 +21,7 @@ interface CustomBarsProps {
roundedRadius: number;
}
export const CustomBars: React.FC<Partial<CustomBarsProps>> = ({
export const CustomBars: React.FC<CustomBarsProps> = ({
x: scaleX,
y: scaleY,
bandwidth,