タグ

ブックマーク / vowsjs.jp (1)

  • Vows « Asynchronous BDD for Node

    Asynchronous behaviour driven development for Node. 非同期にテストしたい理由は二つある。 一つめは、自明な理由だが、node.jsが非同期だから、その上で走るテストも非同期であるべきだ。 二つめは、I/Oを並列化することによって、高速に動作するテストを作るためだ。 vowを書いて、実行しよう: $ vows test/* --spec テストレポートで、思ったとおりに動いていることを確かめよう。 A non-promise return value ✓ should be converted to a promise A topic not emitting an error ✓ should pass null if the test is expecting an error ✓ should pass the result othe

  • 1