File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class BDDTest extends Test, @call_expr {
3333 exists ( CallExpr call | call = this |
3434 call .getCallee ( ) .( VarAccess ) .getName ( ) = "it" and
3535 exists ( call .getArgument ( 0 ) .getStringValue ( ) ) and
36- call .getArgument ( 1 ) .analyze ( ) .getAValue ( ) instanceof AbstractFunction
36+ exists ( call .getArgument ( 1 ) .flow ( ) .getAFunctionValue ( 0 ) )
3737 )
3838 }
3939}
@@ -60,7 +60,7 @@ class JestTest extends Test, @call_expr {
6060 exists ( CallExpr call | call = this |
6161 call .getCallee ( ) .( GlobalVarAccess ) .getName ( ) = "test" and
6262 exists ( call .getArgument ( 0 ) .getStringValue ( ) ) and
63- call .getArgument ( 1 ) .analyze ( ) .getAValue ( ) instanceof AbstractFunction
63+ exists ( call .getArgument ( 1 ) .flow ( ) .getAFunctionValue ( 0 ) )
6464 ) and
6565 getFile ( ) = getTestFile ( any ( File f ) , "test" )
6666 }
@@ -94,7 +94,7 @@ class CucumberTest extends Test, @call_expr {
9494 exists ( DataFlow:: ModuleImportNode m , CallExpr call |
9595 m .getPath ( ) = "cucumber" and
9696 call = m .getAnInvocation ( ) .asExpr ( ) and
97- call .getArgument ( 0 ) .analyze ( ) .getAValue ( ) instanceof AbstractFunction and
97+ exists ( call .getArgument ( 0 ) .flow ( ) .getAFunctionValue ( ) ) and
9898 this = call
9999 )
100100 }
You can’t perform that action at this time.
0 commit comments