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 not work under mac os #1594

Closed
calidion opened this issue Mar 13, 2015 · 5 comments
Closed

_mocha not work under mac os #1594

calidion opened this issue Mar 13, 2015 · 5 comments

Comments

@calidion
Copy link

Error Info:

./node_modules/.bin/_mocha: line 1: /Applications: is a directory
./node_modules/.bin/_mocha: line 2: LICENSE: command not found
./node_modules/.bin/_mocha: line 3: node_modules/: is a directory
./node_modules/.bin/_mocha: line 5: syntax error near unexpected token `('
./node_modules/.bin/_mocha: line 5: `var program = require('commander')'
make: *** [test] Error 2

Solution:
Add this line to the top of _mocha file

#!/usr/bin/env node
@danielstjules
Copy link
Contributor

Related: #1585 #1567 1430c2b #1548

@calidion How are you invoking mocha?

@calidion
Copy link
Author

_mocha --reporter spec
/home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: 1: /home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: /bin: Permission denied
/home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: 2: /home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: LICENSE: not found
/home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: 3: /home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: node_modules/: Permission denied
/home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: 5: /home/travis/build/calidion/web-errors/node_modules/.bin/_mocha: Syntax error: "(" unexpected

@calidion
Copy link
Author

    @$(NPM)/_mocha \
        --reporter $(if $(or $(TEST),$(V)),spec,dot) \
        --slow 600 --timeout 2000 \
        --grep '$(TEST)'

@danielstjules
Copy link
Contributor

Have you tried using mocha instead of _mocha?

@calidion
Copy link
Author

@danielstjules
using mocha works well.
thanks.

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

No branches or pull requests

3 participants