// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally // Copyright (C) 2021 Igalia, S.L. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-temporal.plainyearmonth.prototype.since description: RangeError thrown when roundingIncrement option is NaN info: | sec-getoption step 8.b: b. If _value_ is *NaN*, throw a *RangeError* exception. sec-temporal-totemporalroundingincrement step 5: 5. Let _increment_ be ? GetOption(_normalizedOptions_, *"roundingIncrement"*, « Number », *undefined*, 1). sec-temporal.plainyearmonth.prototype.since step 13: 13. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, *undefined*, *false*). features: [Temporal] ---*/ const earlier = new Temporal.PlainYearMonth(2000, 5); const later = new Temporal.PlainYearMonth(2001, 6); assert.throws(RangeError, () => later.since(earlier, { roundingIncrement: NaN })); reportCompare(0, 0);