51Testing软件测试论坛
标题:
求助各路英雄,看看以下问题何解。回复者必有惊喜等待您!!!
[打印本页]
作者:
Slidechina
时间:
2011-3-2 17:38
标题:
求助各路英雄,看看以下问题何解。回复者必有惊喜等待您!!!
怎么用jsunit测试异步的javascript函数,比如以下的test case。
<script language="javascript">
function testAsyn() { /* Code Code Code
* Code Code Code
*/ Code Code Code
/* Assertion Assertion
* Assertion Assertion
*/ Assertion Assertion var cb = function(msg) {
//code code code
//assertion assertion
};
testAsynFunc(xxx, cb);
/* Assertion Assertion
* Assertion Assertion
*/ Assertion Assertion }
//more tests
//more tests
</script>
作者:
qiguojie
时间:
2011-3-3 18:13
Code Code Code
Code Code Code
Code Code Code
好多……
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2