Skip to content

Commit

Permalink
JS: removed unnecessary findlast module import
Browse files Browse the repository at this point in the history
  • Loading branch information
Napalys committed Nov 19, 2024
1 parent 72a69cf commit b025fc6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions javascript/ql/test/library-tests/Arrays/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,12 @@
sink(arr8_spread.pop()); // NOT OK

sink(arr.findLast(someCallback)); // NOT OK


const myList = [source()];
const element = myList.findLast((item) => sink(item)); // NOT OK - caught by both taint and dataflow tracking.
sink(element); // NOT OK

const mySecondList = source();
const elementSecond = mySecondList.findLast((item) => sink(item)); // NOT OK - only caught by taint-tracking.
});

0 comments on commit b025fc6

Please sign in to comment.