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

前端之家收集整理的这篇文章主要介绍了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.f2er.com/js/157217.html

猜你在找的JavaScript相关文章