mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
remove 0 from the range and use undefined
This commit is contained in:
parent
1161eee3e4
commit
59f5b49359
@ -14,9 +14,6 @@ features: [Intl.DateTimeFormat-fractionalSecondDigits]
|
|||||||
|
|
||||||
const validOptions = [
|
const validOptions = [
|
||||||
[undefined, undefined],
|
[undefined, undefined],
|
||||||
[-0, undefined],
|
|
||||||
[0, undefined],
|
|
||||||
["0", undefined],
|
|
||||||
[1, 1],
|
[1, 1],
|
||||||
["1", 1],
|
["1", 1],
|
||||||
[2, 2],
|
[2, 2],
|
||||||
@ -25,9 +22,8 @@ const validOptions = [
|
|||||||
["3", 3],
|
["3", 3],
|
||||||
[2.9, 2],
|
[2.9, 2],
|
||||||
["2.9", 2],
|
["2.9", 2],
|
||||||
[0.00001, undefined],
|
[1.00001, 1],
|
||||||
[{ toString() { return "3"; } }, 3],
|
[{ toString() { return "3"; } }, 3],
|
||||||
[{ valueOf() { return -0; }, toString: undefined }, undefined],
|
|
||||||
];
|
];
|
||||||
for (const [fractionalSecondDigits, expected] of validOptions) {
|
for (const [fractionalSecondDigits, expected] of validOptions) {
|
||||||
const dtf = new Intl.DateTimeFormat("en", { fractionalSecondDigits });
|
const dtf = new Intl.DateTimeFormat("en", { fractionalSecondDigits });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user