mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Update tests for tc39/ecma402#471 (#2707)
This commit is contained in:
parent
e0758bbeac
commit
6c3f8cdc75
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user