LibJS: Fix value of Temporal.PlainDate.length
Should be 3 (year, month, day, optional calendar-like), not 0.
This commit is contained in:
parent
fd60815c58
commit
c65424d806
Notes:
sideshowbarker
2024-07-18 08:33:46 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/c65424d8068 Pull-request: https://github.com/SerenityOS/serenity/pull/8940 Reviewed-by: https://github.com/IdanHo ✅
2 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ void PlainDateConstructor::initialize(GlobalObject& global_object)
|
|||
// 3.2.1 Temporal.PlainDate.prototype, https://tc39.es/proposal-temporal/#sec-temporal-plaindate-prototype
|
||||
define_direct_property(vm.names.prototype, global_object.temporal_plain_date_prototype(), 0);
|
||||
|
||||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
define_direct_property(vm.names.length, Value(3), Attribute::Configurable);
|
||||
}
|
||||
|
||||
// 3.1.1 Temporal.PlainDate ( isoYear, isoMonth, isoDay [ , calendarLike ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate
|
||||
|
|
|
@ -40,8 +40,8 @@ describe("errors", () => {
|
|||
});
|
||||
|
||||
describe("normal behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.PlainDate).toHaveLength(0);
|
||||
test("length is 3", () => {
|
||||
expect(Temporal.PlainDate).toHaveLength(3);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue