Files
codeql/javascript/ql/src/Metrics/FNumberOfTests.ql
2021-03-25 15:12:09 +00:00

16 lines
357 B
Plaintext

/**
* @name Number of tests
* @description The number of tests defined in a file.
* @kind treemap
* @treemap.warnOn lowValues
* @metricType file
* @metricAggregate avg sum max
* @id js/test-in-files
*/
import semmle.javascript.frameworks.Testing
from File f, int n
where n = strictcount(Test test | test.getFile() = f)
select f, n order by n desc