mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
13 lines
324 B
JavaScript
13 lines
324 B
JavaScript
|
|
test("class accessor should be non-enumerable", () => {
|
||
|
|
class C {
|
||
|
|
get x() {
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
set x(v) {}
|
||
|
|
}
|
||
|
|
|
||
|
|
const desc = Object.getOwnPropertyDescriptor(C.prototype, "x");
|
||
|
|
expect(desc.enumerable).toBeFalse();
|
||
|
|
expect(Object.keys(C.prototype).includes("x")).toBeFalse();
|
||
|
|
});
|