tor-browser

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

basic.js (767B)


      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.instant.fromepochmilliseconds
      7 description: Basic tests for Instant.fromEpochMilliseconds().
      8 features: [BigInt, Temporal]
      9 ---*/
     10 
     11 const afterEpoch = Temporal.Instant.fromEpochMilliseconds(217175010_123);
     12 assert.sameValue(afterEpoch.epochNanoseconds, 217175010_123_000_000n, "fromEpochMilliseconds post epoch");
     13 
     14 const beforeEpoch = Temporal.Instant.fromEpochMilliseconds(-217175010_876);
     15 assert.sameValue(beforeEpoch.epochNanoseconds, -217175010_876_000_000n, "fromEpochMilliseconds pre epoch");
     16 
     17 reportCompare(0, 0);