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

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

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

スポンサード リンク
[PR] 英単語を忘却曲線アプリを使って超効率よく記憶する方法

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したい方は使えますね。

関連の記事検索:jQuery, test, JavaScript
スポンサード リンク

By.KJ : 2008年09月04日 10:03 livedoor Readerで購読 Twitterに投稿

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