busterjs / grunt-buster

Grunt task for running Buster.JS tests in Node.js or headless in PhantomJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Look for buster in ./node_modules/.bin

jacobrask opened this issue · comments

I think that the default location of the buster binary should be the ./node_modules/.bin folder, as that is where the buster version that is specified in the project's package.json file will be located. If that is not found, $PATH/buster could be tried?

npm nicely adds ./node_modules/.bin to $PATH. For instance, having a package.json with a test script allows you to do the following:

package.json:

{
  "devDependencies": {
    "buster": "*",
    "grunt": "*",
    "grunt-buster": "*",
    "phantomjs": "*"
  },
  "scripts": {
    "test": "./node_modules/.bin/grunt buster"
  }
}

Then you can simply run: npm install && npm test

This doesn't install anything globally, and even includes a working phantomjs binary for running the browser tests in. However, it might be cumbersome at times to have to run everything through npm.

just wanted to mention, that @myme's solution it perfectly working :)

Buster and PhantomJS are both searched for in node_module/.bin in master.