量角器+ Simple-SSH如何在Jasmine中使其同步 [英] Protractor + Simple-SSH how to get it sync together in Jasmine
问题描述
我正在用量角器编写一些e2e测试. 在一次测试中,我必须使用ssh物理连接到设备,因此我决定 使用 https://www.npmjs.com/package/simple-ssh >
当我在量角器测试中使用simple-ssh时,Jasmine不会等待simple-ssh且无法正常工作.
是否有可能将它们同步在一起?
我通过使用Jasmine 2.0中的done()解决了这一问题 http://www.htmlgoodies.com/beyond/javascript/stips/using-jasmine-2.0s-new-done-function-to-test-asynchronous-processes.html
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 ?
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
这篇关于量角器+ Simple-SSH如何在Jasmine中使其同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!