diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/Intl/Locale/coerce-options-before-validating-tag.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/tests/non262/Intl/Locale/coerce-options-before-validating-tag.js b/js/src/tests/non262/Intl/Locale/coerce-options-before-validating-tag.js new file mode 100644 index 0000000000..7f57a61132 --- /dev/null +++ b/js/src/tests/non262/Intl/Locale/coerce-options-before-validating-tag.js @@ -0,0 +1,10 @@ +// |reftest| skip-if(!this.hasOwnProperty('Intl')) + +// Throw a TypeError when the |options| argument is null before validating the +// language tag argument. +assertThrowsInstanceOf(() => { + new Intl.Locale("invalid_tag", null); +}, TypeError); + +if (typeof reportCompare === "function") + reportCompare(0, 0); |