tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

locales-invalid.js (820B)


      1 // Copyright 2022 Igalia, S.L. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-Intl.DurationFormat.supportedLocalesOf
      6 description: Checks error cases for the locales argument to the supportedLocalesOf function.
      7 info: |
      8    Intl.DurationFormat.supportedLocalesOf ( locales [, options ])
      9    (...)
     10    2. Let requestedLocales be CanonicalizeLocaleList(locales).
     11 includes: [testIntl.js]
     12 features: [Intl.DurationFormat]
     13 ---*/
     14 
     15 assert.sameValue(typeof Intl.DurationFormat.supportedLocalesOf, "function",
     16                 "Should support Intl.DurationFormat.supportedLocalesOf.");
     17 
     18 for (const [locales, expectedError] of getInvalidLocaleArguments()) {
     19    assert.throws(expectedError, () => Intl.DurationFormat.supportedLocalesOf(locales));
     20 }
     21 
     22 reportCompare(0, 0);