【问题标题】:karma:unit fails with tmp browserify errors业力:单元因 tmp browserify 错误而失败
【发布时间】: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


    【解决方案1】:

    它原来是我们的 repo 中的一个组件,需要目录中的npm install 来安装它的依赖项。

    【讨论】:

      猜你喜欢
      • 2016-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-15
      • 2013-07-15
      相关资源
      最近更新 更多