mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 13:04:39 +02:00
Test PlainYearMonth.prototype.toPlainDate.
This commit is contained in:
parent
51d5cf9a44
commit
fddbb4fdf7
13
test/built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/basic.js
vendored
Normal file
13
test/built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/basic.js
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// 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.plainyearmonth.prototype.toplaindate
|
||||||
|
description: Basic check for toPlainDate()
|
||||||
|
includes: [temporalHelpers.js]
|
||||||
|
features: [Temporal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
const ym = Temporal.PlainYearMonth.from("2002-01");
|
||||||
|
TemporalHelpers.assertPlainDate(ym.toPlainDate({ day: 22 }), 2002, 1, "M01", 22);
|
||||||
|
assert.throws(TypeError, () => ym.toPlainDate({ something: "nothing" }));
|
Loading…
x
Reference in New Issue
Block a user