mirror of
https://github.com/tc39/test262.git
synced 2025-11-17 12:19:49 +01:00
We'll do this for now, then separately work on migrating all of the tests that require a non-ISO8601 calendar but aren't dependent on it being any particular calendar.
15 lines
772 B
JavaScript
15 lines
772 B
JavaScript
// 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.plainmonthday.from
|
|
description: Basic tests for PlainMonthDay.from(object) with missing properties.
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
assert.throws(TypeError, () => Temporal.PlainMonthDay.from({}), "No properties");
|
|
assert.throws(TypeError, () => Temporal.PlainMonthDay.from({ day: 15 }), "Only day");
|
|
assert.throws(TypeError, () => Temporal.PlainMonthDay.from({ monthCode: 'M12' }), "Only monthCode");
|
|
assert.throws(TypeError, () => Temporal.PlainMonthDay.from({ monthCode: undefined, day: 15 }), "monthCode undefined");
|
|
assert.throws(TypeError, () => Temporal.PlainMonthDay.from({ months: 12, day: 31 }), "months plural");
|