caolan / caolan/nodeunit

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

Open
#75 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.9k
Forks
359
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.