test262/test/built-ins/Temporal/PlainDate/compare/argument-propertybag-calend...

21 lines
634 B
JavaScript

// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindate.compare
description: >
A Temporal.Calendar instance passed to compare() in a property bag does
not have its 'calendar' property observably checked
features: [Temporal]
---*/
const calendar = new Temporal.Calendar("iso8601");
Object.defineProperty(calendar, "calendar", {
get() {
throw new Test262Error("calendar.calendar should not be accessed");
},
});
const arg = { year: 1976, monthCode: "M11", day: 18, calendar };
Temporal.PlainDate.compare(arg, arg);