Skip to content

Instantly share code, notes, and snippets.

@arian
Created March 15, 2012 00:13
Show Gist options
  • Save arian/2040623 to your computer and use it in GitHub Desktop.
Save arian/2040623 to your computer and use it in GitHub Desktop.
var mocha = require('mocha');
// setup
var suite = new mocha.Suite('', new mocha.Context),
utils = mocha.utils,
Reporter = mocha.reporters.Spec,
ui = mocha.interfaces['bdd'];
ui(suite);
suite.emit('pre-require', global);
var runner = new mocha.Runner(suite);
var reporter = new Reporter(runner);
require('./test1');
require('./test2');
// run
runner.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment