mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
LibJS: Add tests for symbol object integration
This commit is contained in:
parent
7a1d485b19
commit
119386ffb0
13 changed files with 198 additions and 13 deletions
|
@ -31,6 +31,14 @@ describe("correct behavior", () => {
|
|||
expect(o["hello"]).toBe("friends");
|
||||
});
|
||||
|
||||
test("symbol keys", () => {
|
||||
let object = {};
|
||||
let symbol = Symbol("foo");
|
||||
|
||||
object[symbol] = 2;
|
||||
expect(object[symbol]).toBe(2);
|
||||
});
|
||||
|
||||
test("computed properties", () => {
|
||||
const foo = "bar";
|
||||
const computed = "computed";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue