【发布时间】:2015-04-01 04:58:03
【问题描述】:
我遇到以下问题,我是 6 人团队中唯一遇到此问题的开发人员。
当我运行以下命令时:$ grunt unit (Task: clean:reports install_custom_coverage karma:unit),我收到以下结果:
...
DEBUG [web-server]: serving: C:\Dev\life-web_components\node_modules\karma\static/context.html
PhantomJS 1.9.8 (Windows 7) ERROR
TEST RUN WAS CANCELLED because this file contains some errors:
C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify
IE 8.0.0 (Windows 7) ERROR
TEST RUN WAS CANCELLED because this file contains some errors:
C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify
Chrome 41.0.2272 (Windows 7) ERROR
TEST RUN WAS CANCELLED because this file contains some errors:
C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify
DEBUG [karma]: Run complete, exiting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [framework.browserify]: cleaning up
DEBUG [launcher]: Process PhantomJS exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-34162292
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-61774528
DEBUG [reporter.junit]: JUnit results written to "C:/Dev/life-web_components/reports/unit_tests.xml".
DEBUG [launcher]: Killed extra IE process 6528
DEBUG [launcher]: Process IE exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-94332604
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
我尝试了一系列建议,重新启动 CMDER、重新启动机器、删除 node_modules、重新安装全局节点模块、将 autoWatch 设置为 false 以及其他各种尝试都没有运气。
由于我是团队中唯一遇到此问题的开发人员,因此它似乎与环境有关。
【问题讨论】:
标签: unit-testing gruntjs karma-runner browserify