tor-browser

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

constructor-default-value.js (855B)


      1 // Copyright (C) 2018 Ujjwal Sharma. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-createdatetimeformat
      6 description: >
      7  Tests that the constructor for Intl.DateTimeFormat uses appropriate default
      8  values for its arguments (locales and options).
      9 ---*/
     10 
     11 const actual = new Intl.DateTimeFormat().resolvedOptions();
     12 const expected = new Intl.DateTimeFormat(
     13  [],
     14  Object.create(null)
     15 ).resolvedOptions();
     16 
     17 assert.sameValue(actual.locale, expected.locale);
     18 assert.sameValue(actual.calendar, expected.calendar);
     19 assert.sameValue(actual.day, expected.day);
     20 assert.sameValue(actual.month, expected.month);
     21 assert.sameValue(actual.year, expected.year);
     22 assert.sameValue(actual.numberingSystem, expected.numberingSystem);
     23 assert.sameValue(actual.timeZone, expected.timeZone);
     24 
     25 reportCompare(0, 0);