简体   繁体   English

Grunt + karma + angular-调试单元测试

[英]Grunt+karma+angular - debugging unit tests

I have set up an angular application using Yeoman generator. 我已经使用Yeoman生成器设置了角度应用程序。 It works fine, builds fine and unit tests work. 它工作正常,构建良好并且可以进行单元测试。 I have also added Protractor for e2e tests. 我还为e2e测试添加了量角器。

I've set up Webstorm to run the unit tests as a Node.js run configuration, which executes grunt-cli\\bin\\grunt with the test build task. 我已经将Webstorm设置为作为Node.js运行配置来运行单元测试,该配置通过测试构建任务执行grunt-cli \\ bin \\ grunt。 It runs fine from the IDE. 它可以从IDE正常运行。

However when I'm trying to debug, the execution never stops on breakpoints. 但是,当我尝试调试时,执行永远不会在断点上停止。

The console output is of little help. 控制台输出几乎没有帮助。 The tests simply succeed/fail as expected and that's it. 测试只是按预期成功/失败,仅此而已。

What could be wrong? 有什么事吗

it doesn't seem to be possible to debug protractor tests in webstorm right now. 目前似乎无法在webstorm中调试量角器测试。 Please vote for protractor support: WEB-9236 请投票支持量角器: WEB-9236

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM