1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:27:44 +00:00

LibJS: Implement Temporal.ZonedDateTime.prototype[@@toStringTag]

This commit is contained in:
Linus Groh 2021-08-01 18:02:02 +01:00
parent 4640643019
commit bc416ab802
2 changed files with 8 additions and 0 deletions

View file

@ -18,6 +18,11 @@ ZonedDateTimePrototype::ZonedDateTimePrototype(GlobalObject& global_object)
void ZonedDateTimePrototype::initialize(GlobalObject& global_object)
{
Object::initialize(global_object);
auto& vm = this->vm();
// 6.3.2 Temporal.ZonedDateTime.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype-@@tostringtag
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.ZonedDateTime"), Attribute::Configurable);
}
}

View file

@ -0,0 +1,3 @@
test("basic functionality", () => {
expect(Temporal.ZonedDateTime.prototype[Symbol.toStringTag]).toBe("Temporal.ZonedDateTime");
});