diff options
Diffstat (limited to 'js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-null.js')
-rw-r--r-- | js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-null.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-null.js b/js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-null.js new file mode 100644 index 0000000000..be15359c46 --- /dev/null +++ b/js/src/tests/test262/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/options-null.js @@ -0,0 +1,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.RelativeTimeFormat.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.RelativeTimeFormat] +---*/ + +assert.sameValue(typeof Intl.RelativeTimeFormat.supportedLocalesOf, "function", + "Should support Intl.RelativeTimeFormat.supportedLocalesOf."); + +assert.throws(TypeError, function() { + Intl.RelativeTimeFormat.supportedLocalesOf([], null); +}, "Should throw when passing null as the options argument"); + +reportCompare(0, 0); |