Jasmine2 堆栈跟踪

Jasmine2 Stacktrace

当我们 运行 使用 jasmine2 框架测试量角器时,我们得到相当无用的堆栈跟踪,如下所示。这些是零星的,从不在同一个地方两次。我可以重新运行 测试,它会正常工作。

导致此类错误的具体原因是什么?我该如何解决?

 should log in as admin user and do something (22 secs)
   - Failed: null
     at /var/lib/jenkins/jobs/Code-Test/workspace/node_modules/protractor/node_modules/jasminewd2/index.js:102:16
     at [object Object].promise.ControlFlow.runInFrame_ (/var/lib/jenkins/jobs/Code-Test/workspace/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20)
     at [object Object].promise.Callback_.goog.defineClass.notify (/var/lib/jenkins/jobs/Code-Test/workspace/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:2464:25)
     at [object Object].promise.Promise.notify_ (/var/lib/jenkins/jobs/Code-Test/workspace/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:563:12)

您需要升级jasmine到>=2.2版本(目前最新的是2.3),参考: