Error when I try to run it via npm test or npm run test:
/Users/dave/code/github-dave/expressjs-casperjs-starterkit/node_modules/.bin/mocha-casperjs: line 36: /Users/dave/code/github-dave/expressjs-casperjs-starterkit/node_modules/mocha-casperjs/bin/../../casperjs/bin/casperjs: No such file or directory
npm ERR! Test failed. See above for more details.
so it's bombing at /Users/dave/code/github-dave/expressjs-casperjs-starterkit/node_modules/.bin/mocha-casperjs, line: $mcPath/../../casperjs/bin/casperjs $mcPath/cli.js --mocha-casperjs-path=$mcPath/.. $*
resolved, was missing the casperjs peer dependency since in npm 3.0+ it doesn't install peer dependencies anymore. Installed casperjs package and now it's fine. Thanks nathan for the catch.
This works fine when I run it directly from the terminal:
But when I tried throwing it into a script (and I tried many things today to try getting that to work), it blows up:
Error when I try to run it via
npm test
ornpm run test
:so it's bombing at
/Users/dave/code/github-dave/expressjs-casperjs-starterkit/node_modules/.bin/mocha-casperjs
, line:$mcPath/../../casperjs/bin/casperjs $mcPath/cli.js --mocha-casperjs-path=$mcPath/.. $*