Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Mocha を使用して非同期テストを作成する場合、テスト関数で done パラメータを指定するだけで済みます。
test('foo', function (done) {...});
私の質問は次のとおりです。Mocha は done が与えられたかどうかをどのように知るのですか?
テスト関数の定義は、次のようにする必要があります。
function test(title, fn) {...};
Mocha はどのように fn をチェックしますか?