Debian Codegraph @

js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/locales-invalid.js

raw
1 // Copyright 2018 Igalia, S.L. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-Intl.RelativeTimeFormat.supportedLocalesOf
6 description: Checks error cases for the locales argument to the supportedLocalesOf function.
7 info: |
8 Intl.RelativeTimeFormat.supportedLocalesOf ( locales [, options ])
9
10 2. Let requestedLocales be CanonicalizeLocaleList(locales).
11 includes: [testIntl.js]
12 features: [Intl.RelativeTimeFormat]
13 ---*/
14
15 assert.sameValue(typeof Intl.RelativeTimeFormat.supportedLocalesOf, "function",
16 "Should support Intl.RelativeTimeFormat.supportedLocalesOf.");
17
18 for (const [locales, expectedError] of getInvalidLocaleArguments()) {
19 assert.throws(expectedError, () => Intl.RelativeTimeFormat.supportedLocalesOf(locales));
20 }
21
22 reportCompare(0, 0);