1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:45:09 +00:00

LibJS: Support spreading of strings and string objects

This commit is contained in:
Linus Groh 2020-04-27 14:01:04 +01:00 committed by Andreas Kling
parent bcd5e97286
commit 30fe1b5d58
3 changed files with 60 additions and 19 deletions

View file

@ -24,17 +24,17 @@ try {
assert(testArray(arr));
assertThrowsError(() => {
[...1];
[...1];
}, {
error: TypeError,
message: "1 is not iterable",
error: TypeError,
message: "1 is not iterable",
});
assertThrowsError(() => {
[...{}];
[...{}];
}, {
error: TypeError,
message: "[object Object] is not iterable",
error: TypeError,
message: "[object Object] is not iterable",
});
console.log("PASS");