nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs
MIT License
954 stars 112 forks source link

npm test fails in node 0.10.40 #211

Closed mroderick closed 9 years ago

mroderick commented 9 years ago

On a freshly cloned repository, with node 0.10.40:

npm install
# ...

npm test

> mocha-phantomjs@4.0.1 test /Users/morgan/code/mocha-phantomjs
> mocha --harmony --compilers coffee:coffee-script/register test/mocha-phantomjs.coffee -t 5000

/Users/morgan/code/mocha-phantomjs/test/mocha-phantomjs.coffee:48
'returns a failure code and shows usage when no args are given', function*() {
                                                                         ^
SyntaxError: Unexpected token *
  at Module._compile (module.js:439:25)
  at Object.loadFile (/Users/morgan/code/mocha-phantomjs/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
  at Module.load (/Users/morgan/code/mocha-phantomjs/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at /Users/morgan/code/mocha-phantomjs/node_modules/mocha/lib/mocha.js:216:27
  at Array.forEach (native)
  at Mocha.loadFiles (/Users/morgan/code/mocha-phantomjs/node_modules/mocha/lib/mocha.js:213:14)
  at Mocha.run (/Users/morgan/code/mocha-phantomjs/node_modules/mocha/lib/mocha.js:453:10)
  at Object.<anonymous> (/Users/morgan/code/mocha-phantomjs/node_modules/mocha/bin/_mocha:393:18)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:935:3

npm ERR! Test failed.  See above for more details.

The tests run in 0.12.7.

Perhaps it would be worth updating the test script to detect unsupported environments?

nathanboktae commented 9 years ago

No, 0.10 is ancient. Submit a PR if you feel passionate about it.