Updated mocha test setup to work in the browser and cli.