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
ptomato
left a comment
There was a problem hiding this comment.
LGTM modulo a few minor comments. This is a nice improvement in that test.
…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.