1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibJS: Add tests for symbol object integration

This commit is contained in:
Matthew Olsson 2020-07-07 21:39:36 -07:00 committed by Andreas Kling
parent 7a1d485b19
commit 119386ffb0
13 changed files with 198 additions and 13 deletions

View file

@ -7,3 +7,8 @@ test("use with object", () => {
let names = Object.getOwnPropertyNames({ foo: 1, bar: 2, baz: 3 });
expect(names).toEqual(["foo", "bar", "baz"]);
});
test("use with object with symbol keys", () => {
let names = Object.getOwnPropertyNames({ foo: 1, [Symbol("bar")]: 2, baz: 3 });
expect(names).toEqual(["foo", "baz"]);
});