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

LibJS: Add [[InitialName]] and use it in Function.prototype.toString()

This commit is contained in:
Linus Groh 2022-02-20 17:13:16 +00:00
parent 0be67ef12c
commit e657e88ed6
4 changed files with 18 additions and 4 deletions

View file

@ -127,6 +127,9 @@ describe("correct behavior", () => {
// Built-in functions
expect(console.debug.toString()).toBe("function debug() { [native code] }");
expect(Function.toString()).toBe("function Function() { [native code] }");
expect(
Object.getOwnPropertyDescriptor(Temporal.TimeZone.prototype, "id").get.toString()
).toBe("function get id() { [native code] }");
const values = [
// Callable Proxy