You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Deno的JSDoc中添加指向单元测试的链接

如何在Deno的JSDoc中添加指向单元测试的链接

我当前在Windows 11系统上使用的Deno版本如下:

$ deno --version
deno 2.2.6 (stable, release, x86_64-pc-windows-msvc)
v8 13.5.212.4-rusty
typescript 5.7.3

我希望在函数的文档里添加一个指向对应单元测试的链接。因为Deno是用JSDoc来生成文档的,所以我写了类似这样的代码示例:

/**
 * Test if something is a non-empty string,
 * i.e. isn't all whitespace
 * [unit tests](../test/datatypes.test.civet#:~:text=DBG,isNonEmptyString)
 */

备注:内容来源于stack exchange,提问作者John Deighan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.13 16:17:59