summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DurationFormat/supportedLocalesOf/branding.js
blob: d8ab61d338074b7074f726475eee22ee28b2994c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// |reftest| skip -- Intl.DurationFormat is not supported
// Copyright 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-Intl.DurationFormat.supportedLocalesOf
description: >
    Verifies there's no branding check for Intl.DurationFormat.supportedLocalesOf().
info: |
    Intl.DurationFormat.supportedLocalesOf ( locales [, options ])
features: [Intl.DurationFormat]
---*/

const supportedLocalesOf = Intl.DurationFormat.supportedLocalesOf;

assert.sameValue(typeof supportedLocalesOf, "function");

const thisValues = [
  undefined,
  null,
  true,
  "",
  Symbol(),
  1,
  {},
  Intl.DurationFormat,
  Intl.DurationFormat.prototype,
];

for (const thisValue of thisValues) {
  const result = supportedLocalesOf.call(thisValue);
  assert.sameValue(Array.isArray(result), true);
}

reportCompare(0, 0);