Add mocha programmatic function

Useful for people who already use mocha as their test runner.