前の記事 ≪:Photoshopで漫画エフェクトを与えるチュートリアル20
次の記事 ≫:シンプルなUIアイコンセット「Simplicio」

jQueryを使ったアプリのユニットテスト「QUnit」

2008年09月04日-はてなブックマーク

スポンサード リンク

Getting Started With jQuery QUnit for Client-Side Javascript Testing - Chad Myers' Blog

jQueryを使ったアプリのユニットテスト「QUnit」。
QUnitはjQuery用のテスティングフレームワークです。



テストは次のように書くみたい

test("should hide the element when hide is called", function(){
    $("#testDiv").hide();
    // actual, expected
    equals($("#testDiv").css("display"), "none", "The element should be hidden");
});

jQueryでTDDしたい方は使えますね。

スポンサード リンク

By.KJ : 2008年09月04日 10:03 | ブックマークに追加する livedoor Readerで購読 Twitterに投稿

間違いの指摘をしていただける方はメールでお願いします(クリック)