summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-07-11 21:58:14 +0100
committerLinus Groh <mail@linusgroh.de>2021-07-11 21:58:14 +0100
commit1856400547d004f2de201c332f30754b3d8f91f3 (patch)
tree7b257bbbcae3d556a883c658b166c7e9cbb01969 /Userland
parentdfb7e716f74d43c0996622d25cdda921926af7f3 (diff)
downloadserenity-1856400547d004f2de201c332f30754b3d8f91f3.zip
LibJS: Uncomment Object.{freeze,seal}() tests that now pass :^)
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/Object/Object.freeze.js5
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/Object/Object.seal.js5
2 files changed, 4 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Object/Object.freeze.js b/Userland/Libraries/LibJS/Tests/builtins/Object/Object.freeze.js
index f8b7a89f69..39d5720055 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/Object/Object.freeze.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/Object/Object.freeze.js
@@ -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");
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Object/Object.seal.js b/Userland/Libraries/LibJS/Tests/builtins/Object/Object.seal.js
index d48b0bd9f6..20d6239d82 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/Object/Object.seal.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/Object/Object.seal.js
@@ -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");