mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 09:41:53 +00:00
test-js: Use prettier and format all files
This commit is contained in:
parent
e532888242
commit
6d58c48c2f
Notes:
sideshowbarker
2024-07-19 05:04:03 +09:00
Author: https://github.com/mattco98
Commit: 6d58c48c2f
Pull-request: https://github.com/SerenityOS/serenity/pull/2689
Reviewed-by: https://github.com/linusg
248 changed files with 8291 additions and 7725 deletions
|
@ -1,57 +1,57 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
function foo(...a) {
|
||||
assert(a instanceof Array);
|
||||
assert(a.length === 0);
|
||||
}
|
||||
foo();
|
||||
function foo(...a) {
|
||||
assert(a instanceof Array);
|
||||
assert(a.length === 0);
|
||||
}
|
||||
foo();
|
||||
|
||||
function foo1(...a) {
|
||||
assert(a instanceof Array);
|
||||
assert(a.length === 4);
|
||||
assert(a[0] === "foo");
|
||||
assert(a[1] === 123);
|
||||
assert(a[2] === undefined);
|
||||
assert(a[3].foo === "bar");
|
||||
}
|
||||
foo1("foo", 123, undefined, { foo: "bar" });
|
||||
function foo1(...a) {
|
||||
assert(a instanceof Array);
|
||||
assert(a.length === 4);
|
||||
assert(a[0] === "foo");
|
||||
assert(a[1] === 123);
|
||||
assert(a[2] === undefined);
|
||||
assert(a[3].foo === "bar");
|
||||
}
|
||||
foo1("foo", 123, undefined, { foo: "bar" });
|
||||
|
||||
function foo2(a, b, ...c) {
|
||||
assert(a === "foo");
|
||||
assert(b === 123);
|
||||
assert(c instanceof Array);
|
||||
assert(c.length === 0);
|
||||
}
|
||||
foo2("foo", 123);
|
||||
function foo2(a, b, ...c) {
|
||||
assert(a === "foo");
|
||||
assert(b === 123);
|
||||
assert(c instanceof Array);
|
||||
assert(c.length === 0);
|
||||
}
|
||||
foo2("foo", 123);
|
||||
|
||||
function foo3(a, b, ...c) {
|
||||
assert(a === "foo");
|
||||
assert(b === 123);
|
||||
assert(c instanceof Array);
|
||||
assert(c.length === 2);
|
||||
assert(c[0] === undefined);
|
||||
assert(c[1].foo === "bar");
|
||||
}
|
||||
foo3("foo", 123, undefined, { foo: "bar" });
|
||||
function foo3(a, b, ...c) {
|
||||
assert(a === "foo");
|
||||
assert(b === 123);
|
||||
assert(c instanceof Array);
|
||||
assert(c.length === 2);
|
||||
assert(c[0] === undefined);
|
||||
assert(c[1].foo === "bar");
|
||||
}
|
||||
foo3("foo", 123, undefined, { foo: "bar" });
|
||||
|
||||
var foo = (...a) => {
|
||||
assert(a instanceof Array);
|
||||
assert(a.length === 0);
|
||||
};
|
||||
foo();
|
||||
var foo = (...a) => {
|
||||
assert(a instanceof Array);
|
||||
assert(a.length === 0);
|
||||
};
|
||||
foo();
|
||||
|
||||
var foo = (a, b, ...c) => {
|
||||
assert(a === "foo");
|
||||
assert(b === 123);
|
||||
assert(c instanceof Array);
|
||||
assert(c.length === 2);
|
||||
assert(c[0] === undefined);
|
||||
assert(c[1].foo === "bar");
|
||||
};
|
||||
foo("foo", 123, undefined, { foo: "bar" });
|
||||
var foo = (a, b, ...c) => {
|
||||
assert(a === "foo");
|
||||
assert(b === 123);
|
||||
assert(c instanceof Array);
|
||||
assert(c.length === 2);
|
||||
assert(c[0] === undefined);
|
||||
assert(c[1].foo === "bar");
|
||||
};
|
||||
foo("foo", 123, undefined, { foo: "bar" });
|
||||
|
||||
console.log("PASS");
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue