mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
JS: Add: Test cases for toSpliced with spread operator
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user