Skip to content

Commit

Permalink
update roundingIncrement test
Browse files Browse the repository at this point in the history
  • Loading branch information
romulocintra committed Mar 31, 2022
1 parent dde0c16 commit 80566a8
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ assert.throws(RangeError, function() {
new Intl.NumberFormat([], {roundingIncrement: 5001});
}, '5001');

// InitializeNumberFormat ( numberFormat, locales, options ) (...)
// 23. If roundingIncrement is not 1 and numberFormat.[[RoundingType]] is not fractionDigits, throw a TypeError exception.
assert.throws(TypeError, function() {
new Intl.NumberFormat([], {roundingIncrement: 2, roundingPriority: 'morePrecision'});
}, '2, roundingType is "morePrecision"');
Expand All @@ -41,8 +39,6 @@ assert.throws(TypeError, function() {
new Intl.NumberFormat([], {roundingIncrement: 2, minimumSignificantDigits: 1});
}, '2, roundingType is "significantDigits"');

// InitializeNumberFormat ( numberFormat, locales, options ) (...)
// 24. If roundingIncrement is not 1 and numberFormat.[[MaximumFractionDigits]] is not equal to numberFormat.[[MinimumFractionDigits]], throw a RangeError exception.
assert.throws(RangeError, function() {
new Intl.NumberFormat([], {roundingIncrement: 2, maximumFractionDigits:3 , minimumFractionDigits:2 });
}, '"maximumFractionDigits" is not equal to "minimumFractionDigits"');

0 comments on commit 80566a8

Please sign in to comment.