1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2024 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.plainyearmonth.prototype.toplaindate
7 description: Calendar.dateFromFields method is called with undefined options
13 const calendar = new class extends Temporal.Calendar {
14 dateFromFields(fields, options) {
16 assert.sameValue(options, undefined, "dateFromFields should be called with undefined options");
17 return super.dateFromFields(fields, options);
21 const instance = new Temporal.PlainYearMonth(2000, 5, calendar);
22 instance.toPlainDate({ day: 24 });
23 assert.sameValue(count, 1, "dateFromFields should have been called on the calendar");