3
我正在用Angular4和Typescript編寫esdoc-coverage-plugin和esdoc-typescript-plugin。Typescript ESDoc如何評估評論範圍?
在我的代碼庫,每一個方法,類和成員有一個註釋塊以這種形式:
/** @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分支,我也無法提高覆蓋率。我錯過了什麼?
我無法提供代碼的物理代碼段,但如果您需要更多信息給我一個答案,我可以嘗試回答任何後續問題,謝謝。