微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

javascript – 在Travis CI上进行QUnit测试失败(使用grunt.js在phantomjs上运行)

我们已经在我们的 JavaScript开源项目enchant.js中引入了带有travis CI的CI系统.
https://github.com/wise9/enchant.js

我们喜欢qunit测试,我们用grunt.js(npm)运行它们,但它在Travis CI上失败,出现如下错误

<WARN> PhantomJS timed out,possibly due to a missing QUnit start() call. Use --force to continue. </WARN>

完整的错误消息在这里https://travis-ci.org/wise9/enchant.js/builds/4016842

奇怪的是,每次我运行grunt命令时,超时错误都会导致不同的测试,有时所有测试都会通过(尽管很少见)

.travis.yml

language: node_js
node_js:
  - 0.8
before_install:
  - phantomjs --version

的package.json

{
  "name": "enchant.js","version": "0.6.2","engines": {
    "node": ">=0.8"
  },"scripts": {
    "test": "grunt default --verbose"
  },"devDependencies": {
    "grunt": "0.3.17","grunt-exec": "0.3.0"
  }
}

有谁知道如何解决这个问题?

解决方法

I have the same problem and it’s caused my the fact that QUnit’s asynctest never returns when run in PhantomJS.

We solved the problem by upgrading grunt & grunt-qunit to v0.4. We gave up to understand the exact problem,but it seems the bug you found might be

原文地址:https://www.jb51.cc/js/157217.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐