Node.js 使用jasmine测试节点幻影脚本
使用jasmine测试嵌套异步phantomjs脚本的最佳方法是什么。我已经尝试过使用spyOn和一个异步请求,效果很好。但是如何测试嵌套。我使用的是节点幻影,有下面的页面结构。我想用茉莉花来测试一下Node.js 使用jasmine测试节点幻影脚本,node.js,unit-testing,jasmine,phantomjs,Node.js,Unit Testing,Jasmine,Phantomjs,使用jasmine测试嵌套异步phantomjs脚本的最佳方法是什么。我已经尝试过使用spyOn和一个异步请求,效果很好。但是如何测试嵌套。我使用的是节点幻影,有下面的页面结构。我想用茉莉花来测试一下 phantom.create(function(ph){ ph.createPage(function (page){ page.onConsoleMessage(function(msg){ ... }); page.open(config[server
phantom.create(function(ph){
ph.createPage(function (page){
page.onConsoleMessage(function(msg){
...
});
page.open(config[server].script_url, function(status){
......
});