使用jasmine测试节点幻像脚本

时间:2014-10-26 18:48:44

标签: node.js unit-testing jasmine phantomjs

使用jasmine测试嵌套异步phantomjs脚本的最佳方法是什么。我已经尝试使用spyOn与单个异步请求工作正常。但是如何测试嵌套。我正在使用node-phantom并具有以下页面结构。我想用茉莉花测试一下。

 phantom.create(function(ph){
  ph.createPage(function (page){
   page.onConsoleMessage(function(msg){
       ...

   });

   page.open(config[server].script_url, function(status){
       ......

   });

0 个答案:

没有答案
相关问题