test262/test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-required-prop-undefined-throws.js
2024-10-30 17:18:26 -07:00

18 lines
421 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.zoneddatetime.from
description: from() throws if a required property is undefined.
features: [Temporal]
---*/
assert.throws(TypeError, () => Temporal.ZonedDateTime.from({
year: 1976,
month: undefined,
monthCode: undefined,
day: 18,
timeZone: "+01:00"
}));