tor-browser

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

argument-plainmonthday.js (857B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2022 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 description: A PlainMonthDay object is copied, not returned directly
      8 includes: [temporalHelpers.js]
      9 features: [Temporal]
     10 ---*/
     11 
     12 const orig = new Temporal.PlainMonthDay(5, 2, undefined, 2000);
     13 const result = Temporal.PlainMonthDay.from(orig);
     14 
     15 TemporalHelpers.assertPlainMonthDay(
     16  result,
     17  "M05", 2,
     18  "PlainMonthDay is copied",
     19  /* isoYear = */ 2000
     20 );
     21 
     22 assert.sameValue(result.calendarId, orig.calendarId, "Calendar is copied");
     23 
     24 assert.notSameValue(
     25  result,
     26  orig,
     27  "When a PlainMonthDay is given, the returned value is not the original PlainMonthDay"
     28 );
     29 
     30 reportCompare(0, 0);