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

LibJS: Remove the name prefix for wrapped functions

This is a normative change in the ShadowRealm spec.

See: 4ca634a
This commit is contained in:
Linus Groh 2022-02-12 16:06:37 +00:00
parent 16aeb8b51d
commit c08a52dd97
4 changed files with 8 additions and 8 deletions

View file

@ -46,8 +46,8 @@ describe("normal behavior", () => {
expect(typeof wrappedFunction).toBe("function");
expect(Object.getPrototypeOf(wrappedFunction)).toBe(Function.prototype);
expect(shadowRealm.evaluate("(function () {})").name).toBe("wrapped ");
expect(shadowRealm.evaluate("(function foo() {})").name).toBe("wrapped foo");
expect(shadowRealm.evaluate("(function () {})").name).toBe("");
expect(shadowRealm.evaluate("(function foo() {})").name).toBe("foo");
expect(shadowRealm.evaluate("(function () {})")).toHaveLength(0);
expect(shadowRealm.evaluate("(function (foo, bar) {})")).toHaveLength(2);
expect(