Skip to content

Commit

Permalink
Add tests for DurationFormat PR 172 and 167
Browse files Browse the repository at this point in the history
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
  • Loading branch information
FrankYFTang committed Sep 9, 2023
1 parent 1db9a49 commit 0073051
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2023 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.durationformat.prototype.resolvedoptions
description: order of property keys for the object returned by resolvedOptions()
features: [Intl.DurationFormat]
---*/

assert.sameValue(
'locale,' +
'numberingSystem,' +
'style,' +
'years,' +
'yearsDisplay,' +
'months,' +
'monthsDisplay,' +
'weeks,' +
'weeksDisplay,' +
'days,' +
'daysDisplay,' +
'hours,' +
'hoursDisplay,' +
'minutes,' +
'minutesDisplay,' +
'seconds,' +
'secondsDisplay,' +
'milliseconds,' +
'millisecondsDisplay,' +
'microseconds,' +
'microsecondsDisplay,' +
'nanoseconds,' +
'nanosecondsDisplay',
Object.keys((new Intl.DurationFormat()).resolvedOptions()).toString());

0 comments on commit 0073051

Please sign in to comment.