Mocha test runner as a Browserify plugin

npm install mocaccino
5 downloads in the last day
16 downloads in the last week
99 downloads in the last month

mocaccino Build Status

Mocha test runner as a Browserify plugin.


Install with npm

npm install mocaccino -g


Mocaccino is a browserify plugin:

browserify -p [ mocaccino OPTIONS ]

where OPTIONS are:

  --reporter, -R  Mocha reporter to use, defaults to "tap"
  --yields, -y    Yield every N milliseconds, defaults to 250
  --node          If result is used in node instead of a browser

The yields option causes a tiny delay every N milliseconds to allow pending I/O to happen. It's ignored if --node is given.

Headless browser testing

Browserify a test and run in a Phantom.JS with Phantomic:

$ browserify -p mocaccino test.js | phantomic --brout

Code coverage with headless browser

Use the Coverify transform and Phantomic:

$ browserify -p mocaccino -t coverify test.js | phantomic --brout | coverify

Code coverage with node

Use the Coverify transform and node:

$ browserify --bare -p [ mocaccino --node ] -t coverify test.js | node | coverify



npm loves you