mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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();
|
|
});
|