JS: Add: Test cases for toSpliced with spread operator

This commit is contained in:
Napalys
2024-11-13 17:18:09 +01:00
parent cf90430ec0
commit 8512cb44ff

View File

@@ -67,4 +67,11 @@ function test(x, y) {
let q = [];
q.splice(x, y, ...source());
sink(q); // NOT OK
let r = [];
let rSpliced = r.toSpliced(x, y, ...source());
sink(rSpliced); // NOT OK -- This should flagged but it is not
sink(r); // OK
r = r.toSpliced(x, y, ...source());
sink(r); // NOT OK -- This should flagged but it is not
}