QUnit tests fail on Travis CI (running on phantomjs with grunt.js)
Asked Answered
E

1

7

We've introduced CI system with travis CI to our open source project enchant.js on JavaScript. https://github.com/wise9/enchant.js

We like qunit tests and we're running them with grunt.js (npm), but it fails on Travis CI with an error like this:

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

Full error message is here: https://travis-ci.org/wise9/enchant.js/builds/4016842

The strange thing is, each time I run grunt command, timeout error causes in different tests, and sometimes all of tests pass (in rare probablity though)

.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"
  }
}

Anyone know how to solve this problem?

Elaterite answered 8/1, 2013 at 12:41 Comment(7)
Here is sample build result: another error case (\n was printed once a every seconds for debug) passed oneElaterite
Do the QUnit tests work in the browser?Nuisance
@Nuisance yes, you can run the same test here here.Elaterite
I forked your repo and tried to reproduce the error. It happend from time to time, but I was unable to find the cause. By googling I found others with the same problem, some got it to work when they downgraded PhantomJS to 1.3. But I'm not sure if this is the right track.Nuisance
Thanks. I tried with 1.3 and succeeded, but I couldn't make out what is the problem.Elaterite
Hi @sidestepism, did you solve the problem properly in the end? I have the same problem and it's caused my the fact that QUnit's asyncTest never returns when run in PhantomJS. Got any workarounds? My question / PhantomJS bug reportFagin
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.Elaterite
S
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

Spectra answered 8/1, 2013 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.