Use mocha programmatically