1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

Libraries: Move to Userland/Libraries/

This commit is contained in:
Andreas Kling 2021-01-12 12:17:30 +01:00
parent dc28c07fa5
commit 13d7c09125
1857 changed files with 266 additions and 274 deletions

View file

@ -1,37 +0,0 @@
test("constructs properly", () => {
expect(() => {
new Proxy({}, {});
}).not.toThrow();
});
test("constructor argument count", () => {
expect(() => {
new Proxy();
}).toThrowWithMessage(TypeError, "Proxy constructor requires at least two arguments");
expect(() => {
new Proxy({});
}).toThrowWithMessage(TypeError, "Proxy constructor requires at least two arguments");
});
test("constructor requires objects", () => {
expect(() => {
new Proxy(1, {});
}).toThrowWithMessage(
TypeError,
"Expected target argument of Proxy constructor to be object, got 1"
);
expect(() => {
new Proxy({}, 1);
}).toThrowWithMessage(
TypeError,
"Expected handler argument of Proxy constructor to be object, got 1"
);
});
test("constructor must be invoked with 'new'", () => {
expect(() => {
Proxy({}, {});
}).toThrowWithMessage(TypeError, "Proxy constructor must be called with 'new'");
});