mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibJS: Support spreading of strings and string objects
This commit is contained in:
parent
bcd5e97286
commit
30fe1b5d58
Notes:
sideshowbarker
2024-07-19 07:13:24 +09:00
Author: https://github.com/linusg
Commit: 30fe1b5d58
Pull-request: https://github.com/SerenityOS/serenity/pull/1986
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