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:
parent
bcd5e97286
commit
30fe1b5d58
3 changed files with 60 additions and 19 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue