Website and mobile testing at every stage of development The world relies on your code. Test on thousands of different device, browser, and OS configurations–anywhere, any time.
JavaScript Advent Calendar 2011 (Node.js/WebSocketsコース)3日目のhokacchaです。Node.jsのテストフレームワーク、mochaについて書きます。 mochaはTJが新しく作り始めているテストフレームワークです。ドキュメントを見ればできることは大体書いてありますので、ドキュメントを元にどういうことができるのかを解説していきます。現時点でのバージョンは0.2.0です。 http://visionmedia.github.com/mocha/ shouldについて まずmochaでどういうことができるかの前にshouldについて解説しておきます。mochaのドキュメントには特に説明もなくshouldが使われていて、shouldでどういうことができるかわかってないと、ドキュメントを読んだときにmochaの機能なのかshouldの機能なの
simple, flexible, fun Mocha is a feature-rich JavaScript test framework running on node and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on GitHub. Features browser support simple async support proper exit status for CI support etc auto-detects and
Node.jsで使えるTDD, BDDフレームワークはいくつかあるのですが(nodeunit, Jasmine, etc)コールバック・イベント周りのテストのしやすさとCoffeeScriptが利用出来る Vows が非常に熱い感じです。 特にテストコードをCoffeeScriptで(別途コンパイルせずに)そのまま記述出来るのは、テストコードの可読性を考えると大きなメリットだと思います。 Vowsのインストール# VowsはNode Package Manager(npm)でインストールする事が出来ます。vowsコマンドを有効にするためにカレントディレクトリの node_modules の他にグローバルにも入れておきましょう。 npm install vows npm install -g vows Vowsを使った開発手順# サンプルとして自分のフルネームを返す事しか出来ないPerson
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く