mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Add tests for symbol object integration
This commit is contained in:
committed by
Andreas Kling
parent
7a1d485b19
commit
119386ffb0
@@ -37,3 +37,14 @@ test("computed property method shorthand", () => {
|
||||
};
|
||||
expect(o[14]()).toBe("bar");
|
||||
});
|
||||
|
||||
test("symbol computed property shorthand", () => {
|
||||
const s = Symbol("foo");
|
||||
const o = {
|
||||
foo: "bar",
|
||||
[s]() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o[s]()).toBe("bar");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user