mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibJS: Constructor function's "prototype" property should be writable
This matches other engines.
This commit is contained in:
parent
01c8765519
commit
2e4832c3da
3 changed files with 12 additions and 2 deletions
|
@ -0,0 +1,10 @@
|
|||
test("a function's prototype property should be writable", () => {
|
||||
function x() {}
|
||||
var desc = Object.getOwnPropertyDescriptor(x, "prototype");
|
||||
expect(desc.writable).toBe(true);
|
||||
expect(desc.enumerable).toBe(false);
|
||||
expect(desc.configurable).toBe(false);
|
||||
|
||||
x.prototype = 1;
|
||||
expect(x.prototype).toBe(1);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue