我正在使用Angular4和Typescript编写代码,并使用esdoc-coverage-plugin和esdoc-typescript-plugin。
在我的代码库中,每个方法、类和成员都有一个注释块,格式如下:
/** @method methodName
* @desc method description
* @param {type} paramName - description of paramName
* @returns {type}
*/
methodName(param: type) {
/** the if statement does this */
if(something) {
doSomething();
} else {
doSomethingElse();
}
}
有些文件以这种格式达到了100%,而其他文件则停留在40%。即使在每行代码上添加占位符注释,甚至详细记录每个if-else分支,我也无法提高覆盖率。我错过了什么吗?
我无法提供代码的实际片段,但如果您需要更多信息来回答我的问题,我可以尝试回答任何后续问题,谢谢。