セコン @hotchpotch 時々 rspec 書くと、そもそも文法なんだっけ、expectェ… be_true じゃだめで be_truthyェ… このとき美しく書くには…みたいになってつらい… assert 最高みたいになる
By David Heinemeier Hansson on April 23, 2014 Test-first fundamentalism is like abstinence-only sex ed: An unrealistic, ineffective morality campaign for self-loathing and shaming. It didn't start out like that. When I first discovered TDD, it was like a courteous invitation to a better world of writing software. A mind hack to get you going with the practice of testing where no testing had happen
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
Asynchronous behaviour driven development for Node. There are two reasons why we might want asynchronous testing. The first, and obvious reason is that node.js is asynchronous, and therefore our tests should be. The second reason is to make tests which target I/O run much faster, by running them concurrently. Write some vows, execute them: $ vows test/* --spec Get the report, make sure you kept yo
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く