Configuring Mocha

In notebook:
Work Notes
Created at:
2015-10-19
Updated:
2015-10-19
Tags:
While Karma has a karma.conf.js file, in moche you can add flags like ​--require
I'm running Mocha with the --require ./spec/helper.js​ flag and in the helper.js I'm adding all my expectations and stubbing libraries. Or whatever else I need regularly: 
  // spec/helper.js

global.sinon = require('sinon');
global.chai = require('chai');
global.expect = chai.expect;
global.assert = require('assert');
global.SandboxedModule = require('sandboxed-module');