From b8b93ec421c9297ba4eec56289f0184a495e8bfc Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 24 Oct 2018 15:40:16 +0200 Subject: [PATCH] Intl.RelativeTimeFormat: Test the order of properties in the result of resolvedOptions(). --- .../prototype/resolvedOptions/order.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/intl402/RelativeTimeFormat/prototype/resolvedOptions/order.js diff --git a/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/order.js b/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/order.js new file mode 100644 index 0000000000..93ff115b02 --- /dev/null +++ b/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/order.js @@ -0,0 +1,19 @@ +// Copyright 2018 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-intl.relativetimeformat.prototype.resolvedoptions +description: Verifies the property order for the object returned by resolvedOptions(). +includes: [compareArray.js] +features: [Intl.RelativeTimeFormat] +---*/ + +const options = new Intl.RelativeTimeFormat().resolvedOptions(); + +const expected = [ + "locale", + "style", + "numeric", +]; + +assert.compareArray(Object.getOwnPropertyNames(options), expected);