Jasmine test fails running in VS2012 + Resharper + PhantomJS

自作多情 提交于 2019-12-02 01:56:17

No, you can't change the url. But what is causing your test to fail is most likely a missing file reference. What you can do is to debug the test and check the loaded file references and see what is missing:

  1. Run the tests in a standard browser (Chrome) instead of PhantomJS, you can set it up in:

Resharper -> Options -> Tools -> Unit Testing -> JavaScript Tests -> Run Tests with...

  1. Add this line of code before your test:

jasmine.getEnv().currentRunner().finishCallback = function () { };

This will override the finishCallback function which is called to notify Resharper about test being finished, so the test wil run forever and you can refresh it by hitting F5 and debug indefinitely. You only must stop the test manually then in Resharper's Unit Test Sessions window.

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