From d1c9e47d231834736824a4d615a38a041a37f50e Mon Sep 17 00:00:00 2001 From: Asger F Date: Fri, 1 Nov 2024 13:18:32 +0100 Subject: [PATCH] JS: More aggressive test file classification --- javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll b/javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll index 5dd442263516..8d392bc04482 100644 --- a/javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll +++ b/javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll @@ -61,6 +61,8 @@ predicate isTestFile(File f) { ) or f.getAbsolutePath().regexpMatch(".*/__(mocks|tests)__/.*") + or + f.getBaseName().matches("%.test.%") } /**