-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
402: Replace currency-digits.js Intl.NumberFormat test #4285
402: Replace currency-digits.js Intl.NumberFormat test #4285
Conversation
Hmm, there's no other way to test those code paths, is there? I guess strictly speaking this wouldn't be in scope for test262, but I might be convinced to keep it. |
Yes, there's no real way to test it without appealing to some data source or another, even though for most currencies there's no difference between CLDR and ISO 4217. |
Sudden thought: If |
990bbf6
to
8588bdc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo a few minor comments. This is a nice improvement in that test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
…for currency minor unit digits ISO 4217 no longer normative for currency minor digits. New test verifies that currency data (from whatever source) is used by verifying that `maximumFractionDigits` and `minimumFractionDigits` are identical. See tc39/ecma402#922
…a used for currency minor unit digits
c62167c
to
15b563b
Compare
This test treats ISO 4217 data on the number of minor unit digits to use when formatting currencies. ISO 4217 is no longer normative as of tc39/ecma402#922
Additionally, web reality before that PR is that some implementations already used CLDR data rather than ISO 4217.
I could write a test that only checks the digits on a few currencies for which CLDR and ISO 4217 agree, and which aren't likely to change any time soon. (i.e. USD and EUR using 2 minor digits, JPY using 0). Not sure if that's the right path, though -- any guidance welcome.