From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../weekOfYear/custom-calendar-weekofyear.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 js/src/tests/test262/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/custom-calendar-weekofyear.js (limited to 'js/src/tests/test262/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/custom-calendar-weekofyear.js') diff --git a/js/src/tests/test262/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/custom-calendar-weekofyear.js b/js/src/tests/test262/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/custom-calendar-weekofyear.js new file mode 100644 index 0000000000..97242a19c4 --- /dev/null +++ b/js/src/tests/test262/built-ins/Temporal/PlainDateTime/prototype/weekOfYear/custom-calendar-weekofyear.js @@ -0,0 +1,26 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2024 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.plaindatetime.prototype.weekofyear +description: > + Temporal.PlainDateTime.prototype.weekOfYear returns undefined for all + custom calendars where weekOfYear() returns undefined. +features: [Temporal] +---*/ + +class CustomCalendar extends Temporal.Calendar { + constructor() { + super("iso8601"); + } + weekOfYear() { + return undefined; + } +} + +const calendar = new CustomCalendar(); +const customCalendarDate = new Temporal.PlainDateTime(2024, 1, 1, 12, 34, 56, 987, 654, 321, calendar); +assert.sameValue(customCalendarDate.weekOfYear, undefined); + +reportCompare(0, 0); -- cgit v1.2.3