lib/runners/mocha_runner.js
function () {
    var self = this;

    return new Promise(function (resolve, reject) {
      self.mocha = new Mocha({
        ui       : 'bdd',
        reporter : path.join(__dirname, '../reporters/mocha_worker_reporter'),
        slow     : process.env.WORKER_SLOW || self.SLOW,
        timeout  : process.env.WORKER_TIMEOUT || self.TIMEOUT,
        bail     : true
      });

      self.mocha.addFile(process.env.WORKER_TEST);

      self.runner = self.mocha.run(function (failures) {
        resolve();
      });

      self.runner.on('suite', function (suite) {
        self.totalTests = suite.total;
      });

      self.runner.on('test end', function () {
        self.testsFinished++;
        self.checkMemory();
      });

      self.runner.on('fail', function () {
        self.hasFailingTest = true;
      });

      self.runner.on('end', function () {
        self.checkFinishedTests();
        self.checkTestCount();
        self.checkMemory();

        process.send({
          type : 'suiteDone',
          data : process.env.WORKER_TEST
        });

        cluster.worker.kill(0);
      });
    });
  }
function () {
    var self = this;

    return new Promise(function (resolve, reject) {
      self.mocha = new Mocha({
        ui       : 'bdd',
        reporter : path.join(__dirname, '../reporters/mocha_worker_reporter'),
        slow     : process.env.WORKER_SLOW || self.SLOW,
        timeout  : process.env.WORKER_TIMEOUT || self.TIMEOUT,
        bail     : true
      });

      self.mocha.addFile(process.env.WORKER_TEST);

      self.runner = self.mocha.run(function (failures) {
        resolve();
      });

      self.runner.on('suite', function (suite) {
        self.totalTests = suite.total;
      });

      self.runner.on('test end', function () {
        self.testsFinished++;
        self.checkMemory();
      });

      self.runner.on('fail', function () {
        self.hasFailingTest = true;
      });

      self.runner.on('end', function () {
        self.checkFinishedTests();
        self.checkTestCount();
        self.checkMemory();

        process.send({
          type : 'suiteDone',
          data : process.env.WORKER_TEST
        });

        cluster.worker.kill(0);
      });
    });
  }
////////////////////////////////////////////////////////////////////////// Public methods ///////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// 
MochaRunner.start() -> Object