mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +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
|
@ -9,6 +9,18 @@ test("plain property", () => {
|
|||
expect(o).not.toHaveSetterProperty("foo");
|
||||
});
|
||||
|
||||
test("symbol property", () => {
|
||||
let s = Symbol("foo");
|
||||
let o = { [s]: "bar" };
|
||||
|
||||
expect(o).toHaveConfigurableProperty(s);
|
||||
expect(o).toHaveEnumerableProperty(s);
|
||||
expect(o).toHaveWritableProperty(s);
|
||||
expect(o).toHaveValueProperty(s, "bar");
|
||||
expect(o).not.toHaveGetterProperty(s);
|
||||
expect(o).not.toHaveSetterProperty(s);
|
||||
});
|
||||
|
||||
test("getter property", () => {
|
||||
let o = { get foo() {} };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue