gpt4 book ai didi

javascript - QUnit 测试在 Travis CI 上失败(在带有 grunt.js 的 phantomjs 上运行)

转载 作者:数据小太阳 更新时间:2023-10-29 04:52:53 27 4
gpt4 key购买 nike

我们在 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

包.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

关于javascript - QUnit 测试在 Travis CI 上失败(在带有 grunt.js 的 phantomjs 上运行),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14215189/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com