// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally // Copyright (C) 2026 Igalia, S.L. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-temporal.instant.compare description: Fractional minutes or hours in time string should throw RangeError features: [Temporal] ---*/ const invalidStrings = [ ["2025-04-03T05:07.123[CET]", "Fractional minutes"], ["2025-04-03T12.5[CET]", "Fractional hours"], ]; for (const [arg, description] of invalidStrings) { assert.throws( RangeError, () => Temporal.Instant.compare(arg, new Temporal.Instant(0n)), `${description} not allowed in time string (first argument)` ); assert.throws( RangeError, () => Temporal.Instant.compare(new Temporal.Instant(0n), arg), `${description} not allowed in time string (second argument)` ); } reportCompare(0, 0);