Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocha tests fail on local node #343

Open
rillian opened this issue Oct 28, 2015 · 5 comments
Open

Mocha tests fail on local node #343

rillian opened this issue Oct 28, 2015 · 5 comments
Labels

Comments

@rillian
Copy link
Contributor

rillian commented Oct 28, 2015

I can't run the tests on my Fedora 23 system with the packaged node v0.12.7. Most of the mochaTests fail with:

  29) parsing error tests "before all" hook:
     Error: done() invoked with non-Error: true
      at /home/giles/mozilla/vtt.js/node_modules/mocha/lib/runnable.js:198:38
      at /home/giles/mozilla/vtt.js/node_modules/node-vtt/lib/node-vtt.js:92:14
      at /home/giles/mozilla/vtt.js/node_modules/node-vtt/node_modules/node-phantom/node-phantom.js:65:6
      at null._onTimeout (/home/giles/mozilla/vtt.js/node_modules/node-vtt/node_modules/node-phantom/node-phantom.js:43:5)
      at Timer.listOnTimeout (timers.js:119:15)

Works ok on travis with 0.10 and others report it working on their machines with older node, so I assume it's a compatibility issue.

@rillian
Copy link
Contributor Author

rillian commented Jan 10, 2017

I've tried several things today to make this work, and it fails even with a fresh nvm install of 0.10. I made a docker container and everything: https://github.com/rillian/vtt.js/blob/line-endings/Dockerfile

@gkatsev Any idea what's going on here? Round-tripping things through travis is really slow. Get most of the tests failing if I try this on a fresh checkout:

nvm install 0.10
npm install
npm test

@gkatsev
Copy link
Contributor

gkatsev commented Jan 11, 2017

Hm... Not sure. I can take a look tomorrow. Also, at this point, probably best to upgrade straight to node 4 or maybe even node 6 :)

@rillian
Copy link
Contributor Author

rillian commented Jan 11, 2017

Ok, I'd appreciate it if you could take a look. I was trying to get us upgraded in fact, but I get this error with every node version I try.

@rillian rillian changed the title Mocha tests fail on node 0.12 Mocha tests fail on local node Jan 11, 2017
@rillian
Copy link
Contributor Author

rillian commented Jan 11, 2017

Did a little more digging on my system. I can't just grunt run or bin/cue2json.js either; they both complain. E.g. in a fresh checkout:

nvm use 0.10
npm install
npm install grunt
npm install node-vtt
./bin/cue2json -v tests/cuetext/timestamp/basic.vtt
Error: Unable to initialize an instance of NodeVTT. undefined

@rillian
Copy link
Contributor Author

rillian commented Jan 12, 2017

After chatting with a colleague (thanks @Pomax!) it seems likely the issue is some mismatch between mocha and phantomjs. The tests seems to fail the same as cue2json instantiating a node-vtt instance. If I install phantomjs@1.9.8 (the version travis claims to have installed at the start of the successful runs there) the error message changes:

Running "mochaTest:test" (mochaTest) task


  cue-settings/align tests
phantom crash: code 0
    1) "before all" hook
...

The tests continue (slowly!) from there, so there's some kind of timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants