|
@@ -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");
|