2012年11月23日

摘要: //asyncTest, QUnit中的异步测试,具体参考QUnit官方文档。//直接上代码//step 1: write a simple asyncTest as the following.asyncTest("asynchronous test: one second later!", function() { expect(1); setTimeout(function() { ok(true, "Passed and ready to resume!"); start(); }, 1000);});//step 2: 调用test函数Q... 阅读全文
posted @ 2012-11-23 14:09 ArcherXu 阅读(557) 评论(0) 推荐(0) 编辑
摘要: // 直接上代码//step 1: write a simple test as the following.test("hello test", function() { ok(1 == "1", "Passed!");});//step 2: 调用test函数QUnit = { //... test : function(testName, expected, callback, async) { //... //初始化test, test = new Test({ name : name, ... 阅读全文
posted @ 2012-11-23 14:07 ArcherXu 阅读(298) 评论(0) 推荐(0) 编辑

导航