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:
parent
dc28c07fa5
commit
13d7c09125
1857 changed files with 266 additions and 274 deletions
|
@ -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'");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue