blob: 6c10625d57d87280fd1cb787fb799a8390517fb0 [file] [log] [blame]
// 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.plaintime.prototype.tozoneddatetime
description: >
BuiltinTimeZoneGetInstantFor calls Calendar.dateAdd with undefined as the
options value
includes: [temporalHelpers.js]
features: [Temporal]
---*/
const calendar = TemporalHelpers.calendarDateAddUndefinedOptions();
const timeZone = TemporalHelpers.oneShiftTimeZone(new Temporal.Instant(0n), 3600e9);
const instance = new Temporal.PlainTime();
instance.toZonedDateTime({ plainDate: new Temporal.PlainDate(1970, 1, 1, calendar), timeZone });
assert.sameValue(calendar.dateAddCallCount, 1);