【发布时间】:2018-07-26 11:07:01
【问题描述】:
我想为 Intern 4 功能测试自动生成一些文档。我尝试了 typedoc,它在解析我的对象页面函数时效果很好,但是在功能测试套件上失败了,例如在像这样的文件上
/**
* This is a test comment for general purpose
*/
/**
*
*/
const { registerSuite } = intern.getInterface('object');
const { url } = intern.getPlugin('conf');
import {
tryLogin,
pollForDElement,
clickByDId,
clickSeq,
verifyGantt,
verifyIcon,
verifyCell
} from '../objectPage';
declare let ui: any;
let grid:string;
let id:string;
registerSuite('cells-pre-test',
{
/**
* this is a test comment for a test
*
*/
'login'()
{
return this.remote
.setFindTimeout(20000)
.setPageLoadTimeout(20000)
.setExecuteAsyncTimeout(20000)
.get(url)
.then(tryLogin('xxx', 'xxx'));
}
});
用命令
typedoc --module commonjs --target ES6 --out docs/ tests/
生成的文档中只显示一般用途的注释,而不是测试套件的注释。
任何人都可以帮助我解决这个问题或建议使用自动 Typescript 解析的替代工具吗?
谢谢
【问题讨论】:
标签: typescript intern typedoc