bito-code-review[bot] commented on code in PR #41859:
URL: https://github.com/apache/superset/pull/41859#discussion_r3543481729
##########
superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts:
##########
@@ -1483,6 +1464,14 @@ test('getAxisType does not coerce Numeric x-axis to Time
regardless of values',
);
});
+test('getAxisType uses Value axis for numeric bar charts when not forced
categorical', () => {
+ expect(getAxisType(false, false,
GenericDataType.Numeric)).toEqual(AxisType.Value);
+});
+
+test('getAxisType uses Category axis for numeric bar charts when forced
categorical', () => {
+ expect(getAxisType(false, true,
GenericDataType.Numeric)).toEqual(AxisType.Category);
+});
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Duplicate test assertions</b></div>
<div id="fix">
These two new tests duplicate existing assertions in the same file. Line
1467-1469 tests `getAxisType(false, false, GenericDataType.Numeric)` →
`AxisType.Value` which is already asserted at line 1456-1458. Line 1471-1473
tests `getAxisType(false, true, GenericDataType.Numeric)` → `AxisType.Category`
which is already asserted at line 1445-1449. Remove the duplicate tests.
</div>
</div>
<small><i>Code Review Run #2b4aab</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]