mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
LibJS: Uncomment Object.{freeze,seal}() tests that now pass :^)
This commit is contained in:
parent
dfb7e716f7
commit
1856400547
Notes:
sideshowbarker
2024-07-18 09:15:24 +09:00
@ -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…
Reference in New Issue
Block a user