mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibJS: Uncomment Object.{freeze,seal}() tests that now pass :^)
This commit is contained in:
parent
dfb7e716f7
commit
1856400547
2 changed files with 4 additions and 6 deletions
|
@ -29,9 +29,8 @@ describe("normal behavior", () => {
|
|||
test("prevents changing attributes of existing properties", () => {
|
||||
const o = { foo: "bar" };
|
||||
Object.freeze(o);
|
||||
// FIXME: These don't change anything and should not throw!
|
||||
// expect(Object.defineProperty(o, "foo", {})).toBe(o);
|
||||
// expect(Object.defineProperty(o, "foo", { configurable: false })).toBe(o);
|
||||
expect(Object.defineProperty(o, "foo", {})).toBe(o);
|
||||
expect(Object.defineProperty(o, "foo", { configurable: false })).toBe(o);
|
||||
expect(() => {
|
||||
Object.defineProperty(o, "foo", { configurable: true });
|
||||
}).toThrowWithMessage(TypeError, "Object's [[DefineOwnProperty]] method returned false");
|
||||
|
|
|
@ -29,9 +29,8 @@ describe("normal behavior", () => {
|
|||
test("prevents changing attributes of existing properties", () => {
|
||||
const o = { foo: "bar" };
|
||||
Object.seal(o);
|
||||
// FIXME: These don't change anything and should not throw!
|
||||
// expect(Object.defineProperty(o, "foo", {})).toBe(o);
|
||||
// expect(Object.defineProperty(o, "foo", { configurable: false })).toBe(o);
|
||||
expect(Object.defineProperty(o, "foo", {})).toBe(o);
|
||||
expect(Object.defineProperty(o, "foo", { configurable: false })).toBe(o);
|
||||
expect(() => {
|
||||
Object.defineProperty(o, "foo", { configurable: true });
|
||||
}).toThrowWithMessage(TypeError, "Object's [[DefineOwnProperty]] method returned false");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue