caolan / caolan/nodeunit

Why Explict Invocation of Callback is Needed in setUp and tearDown?

未关闭
#75 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
1.9k
派生
359
PR 合并指标
30 天内没有已合并 PR

描述

I got to know nodeunit by reading this article http://caolanmcmahon.com/posts/unit_testing_in_node_js which should been written when nodeunit is at earlier phase. It doesn't mention that explicit invocation of callback function in setUp and tearDown.

There is no documentation about which arguments should be sent by invoking callback in setUp and tearDown. So, I suppose, in most cases, callback is just invoked without any arguments.

Why bother to require explicit invocation of this callback? can't it just be invoked by the system after setUp and tearDown is invoked?

Thanks,
-Morgan

贡献指南

这个仓库没有索引到贡献指南

调研方向

阅读链接的文章,并将其中的 setup 和 teardown 示例与 nodeunit 的当前文档进行比较。确定哪些 callback 参数和调用行为需要说明,然后记录其理由和预期用法;该 issue 未指定具体的文件或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。