2015-09-19 26 views
1

我创建使用约曼Angular-Fullstack生成一个Web应用程序的工作。一切都从命令行正确运行。我可以使用grunt来启动服务并运行测试。Webstorm噶测试运行不带约曼角fullstack

我要运行的Webstorm用户界面内噶单元测试。我右键点击karma.conf.js并有Webstorm创建噶运行配置我。当我尝试运行该配置时,它会旋转几秒钟然后失败。在Webstorm

卡玛服务器窗口包含此:

/usr/local/bin/node /Applications/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellijServer.js --karmaPackageDir=/Users/williammcneill/Documents/Work/LearnNode/gecko/node_modules/karma --configFile=/Users/williammcneill/Documents/Work/LearnNode/gecko/karma.conf.js 
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/bower_components/angular-route/angular-route.js" does not match any file. 
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/app/app.coffee" does not match any file. 
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/components/**/*.coffee" does not match any file. 
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/components/**/*.jade" does not match any file. 
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/app/**/*.coffee" does not match any file. 
WARN [watcher]: Pattern "/Users/williammcneill/Documents/Work/LearnNode/gecko/client/app/**/*.jade" does not match any file. 
INFO [karma]: Karma v0.12.37 server started at http://localhost:8080/ 
INFO [launcher]: Starting browser PhantomJS 
INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket 29_J57vgWL6mWwyV13tv with id 98142631 

这一切看起来正确的给我。测试运行窗口包含此:

/usr/local/bin/node /Applications/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellijRunner.js --karmaPackageDir=/Users/williammcneill/Documents/Work/LearnNode/gecko/node_modules/karma --serverPort=8080 --urlRoot=/ 
/Applications/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellijRunner.js:54 
     throw e; 
    ^

Error: connect ETIMEDOUT 127.0.0.1:8080 
    at Object.exports._errnoException (util.js:837:11) 
    at exports._exceptionWithHostPort (util.js:860:20) 
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14) 

Process finished with exit code 1 

我无法弄清楚什么是超时。如果我打开http://localhost:8080我看到一个网页看起来像这样。

Local host on 8080 when debugging the Angular application

其中也相貌端正给我。

我还没有实际编写任何代码。我正在采取Yeoman和Webstorm给我的所有默认设置。我想我有所有相关Webstorm插件(AngularJs,噶玛)。

有没有人有洞察到可能发生什么或我如何调试它?

Webstorm 10.0.4,约曼1.4.8,噶0.13.9,节点4.1.0,Mac OS X 10.10.5

回答

0

karma.conf.jsport值设置为8080,即使服务器运行在9000.更改这个值为9000,一切正常。

不确定咕噜配置是如何工作的,或者为什么这样设置,但这是解决方法。