File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,14 @@ class BDDTest extends Test, @call_expr {
39
39
}
40
40
41
41
/**
42
- * Gets the test file for `f` with stem extension `stemExt`.
42
+ * Gets the test file for `f` with stem extension `stemExt`, where `stemExt` is "test" or "spec" .
43
43
* That is, a file named file named `<base>.<stemExt>.<ext>` in the
44
44
* same directory as `f` which is named `<base>.<ext>`.
45
45
*/
46
- bindingset [ stemExt ]
46
+ pragma [ noinline ]
47
47
File getTestFile ( File f , string stemExt ) {
48
+ stemExt = [ "test" , "spec" ] and
49
+ result .getBaseName ( ) .regexpMatch ( ".*\\.(test|spec)\\..*" ) and
48
50
result = f .getParentContainer ( ) .getFile ( f .getStem ( ) + "." + stemExt + "." + f .getExtension ( ) )
49
51
}
50
52
You can’t perform that action at this time.
0 commit comments