Debian Codegraph @

js/src/tests/test262/intl402/DisplayNames/options-getoptionsobject.js

raw
1 // Copyright 2021 Google Inc. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-Intl.DisplayNames
6 description: Checks handling of non-object option arguments to the DisplayNames constructor.
7 info: |
8 Intl.DisplayNames ( locales, options )
9 features: [Intl.DisplayNames,BigInt]
10 ---*/
11
12 const optionsArguments = [
13 null,
14 true,
15 false,
16 "test",
17 7,
18 Symbol(),
19 123456789n,
20 ];
21
22 for (const options of optionsArguments) {
23 assert.throws(TypeError, function() { new Intl.DisplayNames([], options) })
24 }
25
26 reportCompare(0, 0);