mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
test-js: Use prettier and format all files
This commit is contained in:
parent
e532888242
commit
6d58c48c2f
248 changed files with 8291 additions and 7725 deletions
|
@ -1,31 +1,37 @@
|
|||
test("constructs properly", () => {
|
||||
expect(() => {
|
||||
new Proxy({}, {});
|
||||
}).not.toThrow();
|
||||
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");
|
||||
|
||||
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 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");
|
||||
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 must be called with the 'new' operator");
|
||||
expect(() => {
|
||||
Proxy({}, {});
|
||||
}).toThrowWithMessage(TypeError, "Proxy must be called with the 'new' operator");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue