node package manager



Ghoul is a wrapper around mocha-phantomjs with a few strict assumptions:

  1. You're writing tests for front-end consumption only
  2. You're using CommonJS-style exports in your library (ie, browserify)
  3. You want to use mocha
  4. You want to use expect.js
  5. You only want terminal output

In the future I'd like to make this not as strict, but for the time being this is how it will be as this is my current workflow.

As with most things on github, this is a work in progress and API breaking changes are possible with future releases until a stable version is reached.


If you want global access to the ghoul executable install with the global flag

npm i -g ghoul

If you want to use the exposed API or the executable locally

npm i ghoul [--save-dev]


var Ghoul = require('ghoul')
  , ghoul = new Ghoul({ testDirectory: 'test' });;


Usage: ghoul [options]


  -h, --help                        output usage information
  -t, --test-directory <directory>  Directory containing tests


  • HTML Fixtures
  • More choices for assertion libraries (default to node's assert)
  • Expose more options for mocha-phantomjs