node/deps/v8/test/intl/list-format/getoptionsobject.js
Michaël Zasso a7cbf19a82
deps: update V8 to 9.1.269.36
PR-URL: https://github.com/nodejs/node/pull/38273
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
2021-06-10 11:10:13 +02:00

21 lines
627 B
JavaScript

// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Test Intl.ListFormat call GetOptionsObject instead of ToObject
// https://tc39.es/ecma402/#sec-getoptionsobject
// https://tc39.es/ecma262/#sec-toobject
let testCases = [
null, // Null
true, // Boolean
false, // Boolean
1234, // Number
"string", // String
Symbol('foo'), // Symbol
9007199254740991n // BigInt
];
testCases.forEach(function (testCase) {
assertThrows(() => new Intl.ListFormat("en", testCase), TypeError);
});