Skip to content

Commit 2b0def1

Browse files
committed
JS: Add: Test case for checking if regex via using toSpliced
1 parent 52330e8 commit 2b0def1

File tree

1 file changed

+5
-0
lines changed
  • javascript/ql/test/library-tests/RegExp/IsRegex

1 file changed

+5
-0
lines changed

javascript/ql/test/library-tests/RegExp/IsRegex/tst.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ function detectRegexViaSplice(string) {
44
let found = getMyThing().search('regex'); // NOT OK
55
arr.splice(found, 1);
66
};
7+
8+
function detectRegexViaToSpliced(string) {
9+
let found = getMyThing().search('regex'); // NOT OK -- Should be marked as regular expression but it is not.
10+
arr.toSpliced(found, 1);
11+
};

0 commit comments

Comments
 (0)