summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Intl/Locale/coerce-options-before-validating-tag.js
blob: 7f57a61132c91adf2bba3ee9582ec667c4da8ac4 (plain)
1
2
3
4
5
6
7
8
9
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);