JS: Add: Test case for checking if regex via using splice

This commit is contained in:
Napalys
2024-11-14 15:26:34 +01:00
parent 84234d59b9
commit 52330e834c
3 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
| tst.js:1:12:1:38 | '^http: ... le.com' | is a regular expression |
| tst.js:4:37:4:43 | 'regex' | is a regular expression |

View File

@@ -0,0 +1,4 @@
import javascript
from RegExpPatternSource regex
select regex, "is a regular expression"

View File

@@ -0,0 +1,6 @@
new RegExp('^http://test\.example.com'); // NOT OK
function detectRegexViaSplice(string) {
let found = getMyThing().search('regex'); // NOT OK
arr.splice(found, 1);
};