tor-browser

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

options-undefined.js (758B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-temporal.plainmonthday.from
      7 includes: [temporalHelpers.js]
      8 description: Verify that undefined options are handled correctly.
      9 features: [Temporal]
     10 ---*/
     11 
     12 const fields = { month: 2, day: 31 };
     13 
     14 const explicit = Temporal.PlainMonthDay.from(fields, undefined);
     15 TemporalHelpers.assertPlainMonthDay(explicit, "M02", 29, "default overflow is constrain");
     16 
     17 const implicit = Temporal.PlainMonthDay.from(fields);
     18 TemporalHelpers.assertPlainMonthDay(implicit, "M02", 29, "default overflow is constrain");
     19 
     20 reportCompare(0, 0);