Skip to content

Commit 0073051

Browse files
committed
Add tests for DurationFormat PR 172 and 167
Test the order of resolvedOptions in default setting Also add test to check the reading order of options based on the property returned in the default setting resolvedOptions. tc39/proposal-intl-duration-format#167 tc39/proposal-intl-duration-format#172 https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions These two PRs are presenting to TC39 2023-09 meeting
1 parent 1db9a49 commit 0073051

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright 2023 the V8 project authors. All rights reserved.
2+
// This code is governed by the BSD license found in the LICENSE file.
3+
/*---
4+
esid: sec-intl.durationformat.prototype.resolvedoptions
5+
description: order of property keys for the object returned by resolvedOptions()
6+
features: [Intl.DurationFormat]
7+
---*/
8+
9+
assert.sameValue(
10+
'locale,' +
11+
'numberingSystem,' +
12+
'style,' +
13+
'years,' +
14+
'yearsDisplay,' +
15+
'months,' +
16+
'monthsDisplay,' +
17+
'weeks,' +
18+
'weeksDisplay,' +
19+
'days,' +
20+
'daysDisplay,' +
21+
'hours,' +
22+
'hoursDisplay,' +
23+
'minutes,' +
24+
'minutesDisplay,' +
25+
'seconds,' +
26+
'secondsDisplay,' +
27+
'milliseconds,' +
28+
'millisecondsDisplay,' +
29+
'microseconds,' +
30+
'microsecondsDisplay,' +
31+
'nanoseconds,' +
32+
'nanosecondsDisplay',
33+
Object.keys((new Intl.DurationFormat()).resolvedOptions()).toString());

0 commit comments

Comments
 (0)