summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/basic.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/basic.js')
-rw-r--r--js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/basic.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/basic.js b/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/basic.js
new file mode 100644
index 0000000000..f0375df0d3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/basic.js
@@ -0,0 +1,18 @@
+// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
+// 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.prototype.toplainyearmonth
+description: Basic toPlainYearMonth tests.
+includes: [temporalHelpers.js]
+features: [Temporal]
+---*/
+
+const calendar = new Temporal.Calendar("iso8601");
+const pd = new Temporal.PlainDate(1970, 12, 24, calendar);
+const pym = pd.toPlainYearMonth();
+TemporalHelpers.assertPlainYearMonth(pym, 1970, 12, "M12");
+assert.sameValue(pym.getISOFields().calendar, "iso8601");
+
+reportCompare(0, 0);