mirror of
https://github.com/nodejs/node.git
synced 2025-08-20 09:25:30 +02:00

PR-URL: https://github.com/nodejs/node/pull/51362 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
26 lines
1.3 KiB
JavaScript
26 lines
1.3 KiB
JavaScript
// Copyright 2023 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Test the order of the .*Digits in resolvedOptions()
|
|
// [[MinimumIntegerDigits]] "minimumIntegerDigits"
|
|
// [[MinimumFractionDigits]] "minimumFractionDigits"
|
|
// [[MaximumFractionDigits]] "maximumFractionDigits"
|
|
// [[MinimumSignificantDigits]] "minimumSignificantDigits"
|
|
// [[MaximumSignificantDigits]] "maximumSignificantDigits"
|
|
let keys = Object.keys(
|
|
(new Intl.NumberFormat(undefined, {notation:"compact"})
|
|
.resolvedOptions()));
|
|
|
|
assertTrue(keys.indexOf("minimumIntegerDigits") <
|
|
keys.indexOf("minimumFractionDigits",
|
|
"minimumIntegerDigits should be before minimumFractionDigits"));
|
|
assertTrue(keys.indexOf("minimumFractionDigits") <
|
|
keys.indexOf("maximumFractionDigits"),
|
|
"minimumFractionDigits should be before maximumFractionDigits");
|
|
assertTrue(keys.indexOf("maximumFractionDigits") <
|
|
keys.indexOf("minimumSignificantDigits"),
|
|
"maximumFractionDigits should be before minimumSignificantDigits");
|
|
assertTrue(keys.indexOf("minimumSignificantDigits") <
|
|
keys.indexOf("maximumSignificantDigits"),
|
|
"minimumSignificantDigits should be before maximumSignificantDigits");
|