Cowboy-coder/bundle-up — Issue #13: Tests fail to run, mocha throws errors
Author: panosru
Created: 2012-02-06 08:56:03+00:00
State: open

Hi, I tried to run `npm test` and in other way to run mocha tests in that project but I was getting this:

```
root@dev:/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up# npm test

> bundle-up@0.2.5 test /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up
> node_modules/.bin/mocha

................................./home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/test/files/coffee/syntax_error.coffee:
Parse error on line 1: Unexpected '->'

Error: Parse error on line 1: Unexpected '->'
at Object.parseError (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/coffee-script/lib/coffee-script/parser.js:470:11)
at Object.parse (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/coffee-script/lib/coffee-script/parser.js:546:22)
at Object.compile (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/coffee-script/lib/coffee-script/coffee-script.js:40:22)
at Object.coffee (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/lib/default_compilers.coffee:21:21)
at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/lib/compiler.coffee:13:37
at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/lib/otf_compiler.coffee:121:16
at [object Object]. (fs.js:115:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1111:12)
at Object.wrapper [as oncomplete] (fs.js:254:17)
./home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/test/files/stylus/syntax_error.styl:1
> 1| syntax
2| error
3|

unexpected "space"

ParseError: /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/test/files/stylus/syntax_error.styl:1
> 1| syntax
2| error
3|

unexpected "space"

at Parser.error (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/stylus/lib/parser.js:159:11)
at Parser.stmt (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/stylus/lib/parser.js:565:32)
at Parser.statement (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/stylus/lib/parser.js:449:21)
at Parser.parse (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/stylus/lib/parser.js:138:23)
at Renderer.render (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/stylus/lib/renderer.js:65:22)
at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/lib/compiler.coffee:20:48
at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/lib/otf_compiler.coffee:121:16
at [object Object]. (fs.js:115:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1111:12)
at Object.wrapper [as oncomplete] (fs.js:254:17)
.Error: ENOENT, no such file or directory '/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/test/files/coffee/not_found.coffee'
............

✖ 1 of 46 tests failed:

1) bundle:true "before each" hook:
Error: global leak detected: v
at Runner.checkGlobals (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/mocha/lib/runner.js:104:21)
at Runner. (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/mocha/lib/runner.js:44:44)
at Runner.emit (events.js:67:17)
at /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/mocha/lib/runner.js:170:12
at Hook.run (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/mocha/lib/runnable.js:159:5)
at next (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/mocha/lib/runner.js:167:10)
at Array.0 (/home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/node_modules/mocha/lib/runner.js:176:5)
at EventEmitter._tickCallback (node.js:192:40)

npm ERR! bundle-up@0.2.5 test: `node_modules/.bin/mocha`
npm ERR! `sh "-c" "node_modules/.bin/mocha"` failed with 1
npm ERR!
npm ERR! Failed at the bundle-up@0.2.5 test script.
npm ERR! This is most likely a problem with the bundle-up package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node_modules/.bin/mocha
npm ERR! You can get their info via:
npm ERR! npm owner ls bundle-up
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.32-5-amd64
npm ERR! command "node" "/usr/local/bin/npm" "test"
npm ERR! cwd /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! code ELIFECYCLE
npm ERR! message bundle-up@0.2.5 test: `node_modules/.bin/mocha`
npm ERR! message `sh "-c" "node_modules/.bin/mocha"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/rnd/domains/design.rnd/public_html/app-ui/apps/main/node_modules/bundle-up/npm-debug.log
npm not ok
```