Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / intl402 / DurationFormat / prototype / format / numeric-hour-with-zero-minutes-and-non-zero-seconds.js
blob3c37afa1b4c75f20d9da62eb4963eed08e97a9ec
1 // |reftest| skip -- Intl.DurationFormat is not supported
2 // Copyright (C) 2023 AndrĂ© Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-Intl.DurationFormat.prototype.format
7 description: >
8   Minutes with numeric or 2-digit style are included in the output when between displayed hours and seconds, even when the minutes value is zero.
9 locale: [en]
10 features: [Intl.DurationFormat]
11 ---*/
13 const df = new Intl.DurationFormat("en", {
14   // hours must be numeric, so that a time separator is used for the following units.
15   hours: "numeric",
16 });
18 const duration = {
19   hours: 1,
20   minutes: 0,
21   seconds: 3,
24 const expected = "1:00:03"
26 assert.sameValue(
27   df.format(duration),
28   expected,
29   `Minutes always displayed when between displayed hours and seconds, even if minutes is 0`
32 reportCompare(0, 0);