blob: d1a92f7601a9fdac577cd6fa7743f792e90c31c1 [file] [log] [blame]
//@ requireOptions("--useTemporal=1")
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error(`expected ${expected} but got ${actual}`);
}
let before = Date.now();
let instant = Temporal.Now.instant();
let after = Date.now();
shouldBe(instant instanceof Temporal.Instant, true);
shouldBe(instant.epochMilliseconds >= before, true);
shouldBe(instant.epochMilliseconds <= after, true);