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

相关文章

kindeditor4.x代码高亮功能默认使用的是prettify插件,prett...
这一篇我将介绍如何让kindeditor4.x整合SyntaxHighlighter代...
js如何实现弹出form提交表单?(图文+视频)
js怎么获取复选框选中的值
js如何实现倒计时跳转页面
如何用js控制图片放大缩小