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

@@ -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() {} };