mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +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,25 +0,0 @@
|
|||
function testArray(arr) {
|
||||
return arr.length === 4 && arr[0] === "a" && arr[1] === "b" && arr[2] === "c" && arr[3] === "d";
|
||||
}
|
||||
|
||||
test("spreading string literal", () => {
|
||||
expect(["a", ..."bc", "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading string variable", () => {
|
||||
const s = "bc";
|
||||
expect(["a", ...s, "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading string in object", () => {
|
||||
const obj = { a: "bc" };
|
||||
expect(["a", ...obj.a, "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading empty string", () => {
|
||||
expect([..."", "a", ..."bc", ..."", "d", ...""]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
||||
|
||||
test("spreading string objects", () => {
|
||||
expect([..."", ...[...new String("abc")], "d"]).toEqual(["a", "b", "c", "d"]);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue