1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:57:35 +00:00

LibJS: Remove argument count checks in Object.* methods

These are inconsistent with the specification.
This commit is contained in:
Idan Horowitz 2021-06-12 20:03:10 +03:00 committed by Linus Groh
parent b9d4dd6850
commit a2da3f97ef
3 changed files with 0 additions and 33 deletions

View file

@ -12,16 +12,6 @@ describe("correct behavior", () => {
});
describe("errors", () => {
test("requires two arguments", () => {
expect(() => {
Object.setPrototypeOf();
}).toThrowWithMessage(TypeError, "Object.setPrototypeOf requires at least two arguments");
expect(() => {
Object.setPrototypeOf({});
}).toThrowWithMessage(TypeError, "Object.setPrototypeOf requires at least two arguments");
});
test("prototype must be an object", () => {
expect(() => {
Object.setPrototypeOf({}, "foo");