blob: 2c1ece3799242f883784c4c3d0e4fd85347ad436 [file] [log] [blame]
import * as namespace from "./namespace-set-prototype-of.js"
import { shouldBe, shouldThrow } from "./resources/assert.js";
shouldThrow(() => {
Object.setPrototypeOf(namespace, {});
}, `TypeError: Cannot set prototype of immutable prototype object`);
shouldBe(Reflect.setPrototypeOf(namespace, {}), false);
shouldBe(Reflect.setPrototypeOf(namespace, null), true);
shouldBe(Object.setPrototypeOf(namespace, null), namespace);