Update tests for tc39/ecma402#471 (#2707)

This commit is contained in:
Ujjwal Sharma 2020-08-13 17:31:24 +00:00 committed by GitHub
parent e0758bbeac
commit 6c3f8cdc75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,17 +5,17 @@
esid: sec-setnfdigitoptions
description: >
When a currency is used in Intl.NumberFormat and minimumFractionDigits is
not provided, maximumFractionDigits should be range-checked against it.
not provided, maximumFractionDigits should be set as provided.
---*/
assert.throws(RangeError, () => new Intl.NumberFormat('en', {
assert.sameValue((new Intl.NumberFormat('en', {
style: 'currency',
currency: 'USD',
maximumFractionDigits: 1
}), 'CurrencyDigits(USD) == 1');
})).resolvedOptions().maximumFractionDigits, 1);
assert.throws(RangeError, () => new Intl.NumberFormat('en', {
assert.sameValue((new Intl.NumberFormat('en', {
style: 'currency',
currency: 'CLF',
maximumFractionDigits: 3
}), 'CurrencyDigits(CLF) == 3');
})).resolvedOptions().maximumSignificantDigits, 3);