summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/ListFormat/constructor/supportedLocalesOf/options-null.js
blob: dbc7036579fe7971ad118b2310e1a1775fe7ab2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-Intl.ListFormat.supportedLocalesOf
description: Checks handling of a null options argument to the supportedLocalesOf function.
info: |
    SupportedLocales ( availableLocales, requestedLocales, options )

    1. If options is not undefined, then
        a. Let options be ? ToObject(options).
features: [Intl.ListFormat]
---*/

assert.sameValue(typeof Intl.ListFormat.supportedLocalesOf, "function",
                 "Should support Intl.ListFormat.supportedLocalesOf.");

assert.throws(TypeError, function() {
  Intl.ListFormat.supportedLocalesOf([], null);
}, "Should throw when passing null as the options argument");

reportCompare(0, 0);