mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Expect undefined
when no fractional second digits are present
Change the expected value per the current PR.
This commit is contained in:
parent
28c6ea208d
commit
d42aaa4b15
@ -13,10 +13,10 @@ features: [Intl.DateTimeFormat-fractionalSecondDigits]
|
|||||||
|
|
||||||
|
|
||||||
const validOptions = [
|
const validOptions = [
|
||||||
[undefined, 0],
|
[undefined, undefined],
|
||||||
[-0, 0],
|
[-0, undefined],
|
||||||
[0, 0],
|
[0, undefined],
|
||||||
["0", 0],
|
["0", undefined],
|
||||||
[1, 1],
|
[1, 1],
|
||||||
["1", 1],
|
["1", 1],
|
||||||
[2, 2],
|
[2, 2],
|
||||||
@ -25,9 +25,9 @@ const validOptions = [
|
|||||||
["3", 3],
|
["3", 3],
|
||||||
[2.9, 2],
|
[2.9, 2],
|
||||||
["2.9", 2],
|
["2.9", 2],
|
||||||
[0.00001, 0],
|
[0.00001, undefined],
|
||||||
[{ toString() { return "3"; } }, 3],
|
[{ toString() { return "3"; } }, 3],
|
||||||
[{ valueOf() { return -0; }, toString: undefined }, 0],
|
[{ 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