public static JstdTestStructure newPropertyBasedTestStructure(@NotNull JSProperty jsProperty) {
PsiElement testMethodNameDeclaration = JsPsiUtils.getPropertyNamePsiElement(jsProperty);
if (testMethodNameDeclaration == null) {
return null;
}
JSFunctionExpression testMethodBody = ObjectUtils.tryCast(jsProperty.getValue(), JSFunctionExpression.class);
String testName = StringUtil.stripQuotesAroundValue(testMethodNameDeclaration.getText());
if (checkTestName(testName)) {
return new JstdTestStructure(testName, testMethodNameDeclaration, null, testMethodBody, jsProperty);
}
return null;