motherjones/mocaccino.js

Name: mocaccino.js

Owner: Mother Jones

Description: Mocha test runner as a Browserify plugin

Created: 2014-06-09 19:58:40.0

Updated: 2014-06-11 20:57:15.0

Pushed: 2014-06-09 20:51:47.0

Homepage:

Size: 153

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

mocaccino Build Status

Mocha test runner as a Browserify plugin.

Repository: https://github.com/mantoni/mocaccino.js


Install with npm
install mocaccino -g
Usage

Mocaccino is a browserify plugin:

serify -p [ mocaccino OPTIONS ]

e OPTIONS are:

ui, -U Mocha User Interface to use, defaults to "bdd"
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:

owserify -p mocaccino test.js | phantomic --brout
Code coverage with headless browser

Use the Coverify transform and Phantomic:

owserify -p mocaccino -t coverify test.js | phantomic --brout | coverify
Code coverage with node

Use the Coverify transform and node:

owserify --bare -p [ mocaccino --node ] -t coverify test.js | node | coverify
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.