Protractor + Simple-SSH how to get it sync together in Jasmine

梦想的初衷 提交于 2020-04-30 07:22:19

问题


I'm writing some e2e tests with protractor . During one test I have to physically connect to device with ssh so i decided to use https://www.npmjs.com/package/simple-ssh

When I use simple-ssh inside my protractor test's , Jasmine doesn't wait for simple-ssh and it is not working.

Is there any possibility to sync that together ?


回答1:


I solved that by using done() from Jasmine 2.0 http://www.htmlgoodies.com/beyond/javascript/stips/using-jasmine-2.0s-new-done-function-to-test-asynchronous-processes.html



来源:https://stackoverflow.com/questions/38788941/protractor-simple-ssh-how-to-get-it-sync-together-in-jasmine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!