Debian Codegraph @

js/src/tests/test262/intl402/DurationFormat/supportedLocalesOf/branding.js

raw
1 // |reftest| skip-if(!Intl.hasOwnProperty('DurationFormat')) -- Intl.DurationFormat is not enabled unconditionally
2 // Copyright 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-Intl.DurationFormat.supportedLocalesOf
7 description: >
8 Verifies there's no branding check for Intl.DurationFormat.supportedLocalesOf().
9 info: |
10 Intl.DurationFormat.supportedLocalesOf ( locales [, options ])
11 features: [Intl.DurationFormat]
12 ---*/
13
14 const supportedLocalesOf = Intl.DurationFormat.supportedLocalesOf;
15
16 assert.sameValue(typeof supportedLocalesOf, "function");
17
18 const thisValues = [
19 undefined,
20 null,
21 true,
22 "",
23 Symbol(),
24 1,
25 {},
26 Intl.DurationFormat,
27 Intl.DurationFormat.prototype,
28 ];
29
30 for (const thisValue of thisValues) {
31 const result = supportedLocalesOf.call(thisValue);
32 assert.sameValue(Array.isArray(result), true);
33 }
34
35 reportCompare(0, 0);