mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
Temporal tests written for the SpiderMonkey implementation. Mostly covers edge cases around mathematical operations and regression tests for reported spec bugs.
21 lines
539 B
JavaScript
21 lines
539 B
JavaScript
// Copyright (C) 2022 André Bargull. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-temporal.instant.compare
|
|
description: >
|
|
Throws when argument at maximum representable date/time value with a negative offset.
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
// Not a valid epoch nanoseconds value due to the offset.
|
|
var one = "+275760-09-13T00:00:00.000-12";
|
|
|
|
var two = {
|
|
toString() {
|
|
throw new Test262Error();
|
|
}
|
|
};
|
|
|
|
assert.throws(RangeError, () => Temporal.Instant.compare(one, two));
|