test262/test/intl402/RelativeTimeFormat/constructor/constructor/options-numberingSystem-valid.js
Ms2ger 28b4fcca4b Add tests for the numberingSystem option to RelativeTimeFormat. (#2459)
* Add tests for the numberingSystem option to RelativeTimeFormat.

* fixup! Add tests for the numberingSystem option to RelativeTimeFormat.
2020-01-08 16:29:13 -05:00

28 lines
740 B
JavaScript

// Copyright 2018 André Bargull; Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-Intl.RelativeTimeFormat
description: Checks valid cases for the options argument to the RelativeTimeFormat constructor.
features: [Intl.RelativeTimeFormat]
---*/
assert.sameValue(typeof Intl.RelativeTimeFormat, "function");
const validNumberingSystemOptions = [
"abc",
"abcd",
"abcde",
"abcdef",
"abcdefg",
"abcdefgh",
"12345678",
"1234abcd",
"1234abcd-abc123",
];
for (const numberingSystem of validNumberingSystemOptions) {
const rtf = new Intl.RelativeTimeFormat("en", {numberingSystem});
assert.sameValue(rtf.resolvedOptions().numberingSystem, "latn");
}