JstdTestFileStructure testFileStructure = JstdTestFileStructureBuilder.getInstance().fetchCachedTestFileStructure(jsFile);
for (JstdTestCaseStructure structure : testFileStructure.getTestCaseStructures()) {
if (structure.getTestCount() == 0) {
JSCallExpression callExpression = structure.getEnclosingCallExpression();
if (callExpression.isValid()) {
JSReferenceExpression methodExpression = ObjectUtils.tryCast(callExpression.getMethodExpression(), JSReferenceExpression.class);
if (methodExpression != null) {
int startOffset = methodExpression.getStartOffsetInParent();
TextRange rangeInElement = TextRange.create(
startOffset,
startOffset + methodExpression.getTextLength()
);
holder.registerProblem(
callExpression,
"TestCase has no tests. Tests names should have 'test' prefix.",
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,