qf-jonathan commented on code in PR #37039:
URL: https://github.com/apache/superset/pull/37039#discussion_r2680926588
##########
superset-frontend/packages/superset-ui-core/test/currency-format/CurrencyFormatter.test.ts:
##########
@@ -146,9 +148,9 @@ test('CurrencyFormatter:format', () => {
const currencyFormatterWithPercentD3 = new CurrencyFormatter({
currency: { symbol: 'USD', symbolPosition: 'prefix' },
- d3Format: ',.1f%',
+ d3Format: ',.1%',
});
- expect(currencyFormatterWithPercentD3(VALUE)).toEqual('$ 56,100,057.0');
+ expect(currencyFormatterWithPercentD3(VALUE)).toEqual('$ 5,610,005,700.0');
Review Comment:
The original intent seems to be replacing the `$` and `%` symbols with a
custom prefix or suffix, loosely following D3’s behavior. For example, `$,.2%`
formats `123.321` as `$12,332.10`, effectively ignoring `%`. Given that, the
current behavior appears to be expected.
--
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]